Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > c# > march 2006 > threads for monday march 27

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Logic(Array) in C#(V1.1)
Posted by Kondapanaidu at 3/27/2006 11:47:01 PM
Hi, What is the logic to compare Values. First array={5,5,6,7}; Second array={5,3,3,2}; Explanation: 1.First array first element is greater than the second array first element, No need to check remaining cases. 2.First Array First Element is same as second array First element then we...more >>


Listbox header
Posted by Alex Bibiano at 3/27/2006 10:51:47 PM
Is it possible to display a column header in a listbox? ...more >>

User Control Focus Issues
Posted by Hrrglburf at 3/27/2006 10:04:00 PM
This is driving me nuts... Anyone have a clue why when a user control is focused, this.Focus(), that child controls under the same container do not get redrawn/updated? am I the only one experiencing this? ...more >>

ArrayList.Synchronized lock both read and write/add, insert and remove ? Is sync needed even at race condition?
Posted by Ryan Liu at 3/27/2006 9:48:09 PM
Hi, What does ArrayList.Synchronized really do for an ArrayList? Is that equal to add lock(this) for all its public methods and properties? Not just for Add()/Insert()/Remvoe()/Count, but also for Item (this[])? Normally,do I need sync at all? Isn't that true without sync the program can ...more >>

Why use a Struct instead of a Class.
Posted by Paul Aspinall at 3/27/2006 9:33:18 PM
Hi I've used both Struct and Classes. However, after reading a few articles lately, I'm starting to wonder why you would really use a Struct over a class. The only reason seems to be that Structs are Valuetypes, and can perform better with smaller data types (ie < 16 bytes). But in the kind o...more >>

Need help with impersonation, please.
Posted by jeremiah johnson at 3/27/2006 9:32:48 PM
I have a .net DLL that I've created (based on someone's post in this group, sorry I've forgotten who) and I need a little help with making it work. I want to provide the same functionality as "runas /netonly" and I'm using LOGON32_LOGON_NEW_CREDENTIALS as I've read here many times. I'm t...more >>

UserControls and Panels
Posted by Søren Dreijer at 3/27/2006 9:29:04 PM
Hi, I realize this is a very common problem, but even though I've scoured the Internet for resources, I can't seem to solve this issue :| I currently have a very simple application. It contains a a single main dialog in which all user interaction occurs. The dialog consists of "views", t...more >>

Unexpected behavior - getting exception - Underlying connection cl
Posted by Rahul Anand at 3/27/2006 9:09:01 PM
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running...more >>



Why use a Struct instead of a Class
Posted by Paul Aspinall at 3/27/2006 8:05:21 PM
Hi I've used both Struct and Classes. However, after reading a few articles lately, I'm starting to wonder why you would really use a Struct over a class. The only reason seems to be that Structs are Valuetypes, and can perform better with smaller data types (ie < 16 bytes). But in the kin...more >>

wierd behavior - no Exceptions thrown!
Posted by Sa¹o Zagoranski at 3/27/2006 6:57:45 PM
Hi... This is driving me crazy and I really hope I can get an answer... Take a look at the piece of code below (I'm using .net 2.0): try { double pointTime = XDate.DateTimeToXLDate(point.time); double pointValue = Convert.ToDouble(point.value); list.Add(pointTime, poin...more >>

Enforce declaration of values (C# 2.0)
Posted by Michael Schöller at 3/27/2006 4:56:24 PM
Hi I have some "unusual" problem ^^ Is there an way to enforce the declaration of values? If the answer is no use propertys can anyone tell me how to access a construct like this over properties. Access should be easy like ....some code Memory m; ....some code byte v = m.complete[22]; .....more >>

Access keywords with classes
Posted by Dylan Parry at 3/27/2006 4:37:18 PM
Hi, I understand how access keywords like public, private, protected etc work when it comes to using them in method declarations, but how do they work when it comes to class declarations? For example, what would the following mean: namespace example { public class Foo { ... ...more >>

Picturebox, focus, and tabstops
Posted by munglet NO[at]SPAM hotmail.com at 3/27/2006 3:59:47 PM
Is there anyway to get a picturebox to recieve focus? I ask because I implemented a "delete" button in a picturebox (due to size constraints), but now due to accessibility reasons I need to be able to tab to the picturebox via the keyboard. Since the picturebox doesn't recieve focus the user ...more >>

Syntax question
Posted by Greg Smith at 3/27/2006 2:38:47 PM
I am trying to pass a reference to an array to another function. Something like: int x = ReadArray(myVars.theArray); private int ReadArray(Array ar) { return ar[2, 2] } I can't seem to get it to except the reference passed. Any help is greatly appreciated. ...more >>

asynchronous methods or create my own threads?
Posted by djc at 3/27/2006 2:38:46 PM
here is my task: I am writing a command line utility that I can use to quickly reboot some wireless access points (why? short answer: budget). That part is already done. All it does is send the url that is essentially the command to reboot to one or all of my access points. This works fine. What...more >>

System.Convert.ToInt32 vs Int32.Parse
Posted by Paul Aspinall at 3/27/2006 2:38:13 PM
Hi Can anyone offer a comparison of System.Convert.ToInt32 vs Int32.Parse Thanks ...more >>

Dropping controls in a User Control ges added to parent control
Posted by Joe at 3/27/2006 2:03:48 PM
Hello all, When I drop a control (say a Button) on my user control, the button is added to the parent control of my user control and not my control. For example if my user control is on a panel and a drop a button on it, the button is added to the panel.Controls. I tried Bring to Front but ...more >>

Checking for last row in a datarow
Posted by maflatoun NO[at]SPAM gmail.com at 3/27/2006 1:50:44 PM
Hi everyone, I like add \r\n to all my rows except for the last row. How do I check for the last in the following code? StringBuilder sb = new StringBuilder(); foreach (DataRow row in rows) { sb.Append(row["Mesg"].ToString(...more >>

Too Many Assertions?
Posted by Jefffff at 3/27/2006 1:40:58 PM
Regarding the use of assertions: According to Juval Lowy's excellent coding standards document (PDF download available at www.idesign.net), every assumption in your code should have an assertion... and on average, every 5th line is an assertion. My question: Do any of you include that many ...more >>

Playing MP3 files!
Posted by Lee at 3/27/2006 1:37:57 PM
Hi, I am trying to play mp3 files and have created a simple class to that accepts a file which can be played and then stopped by calling a stop method, however.... when an mp3 is re-played the previous one is too!!! what is going wrong here? class sound { private bool playing; ...more >>

Datagrid Question
Posted by Mike Collins at 3/27/2006 12:59:03 PM
I would like to read the value in a certain column of my datagrid. Can someone please help me with the syntax? I found one way to do this was: string myString = dgListPersonnel.SelectedItem.Cells[1].Text But it must be old because I get the following error: error: 'dgListPersonnel.Selecte...more >>

XML => Class
Posted by Just D. at 3/27/2006 12:55:25 PM
All, Is there any way to create a class from the XML file or at least to simplify the process of the creation of the class knowing the XML file format, its structure, etc.? The idea is to use an XML file to transfer data between two (or more) companies. I would not like to expose as our ...more >>

How can I get the Identity value of a newly inserted record?
Posted by Doru Roman at 3/27/2006 12:22:54 PM
Hi, I insert a new record with a command: private SqlCommand comInsert; comInsert = conDataBase.CreateCommand(); comInsert.CommandType = CommandType.Text; comInsert.CommandText = "Insert Into MyTable ( Col1, Col2) Values(1,2)"; comInsert.ExecuteNonQuery(); Col3 is an Identity c...more >>

Sort DataTable
Posted by Necqui Teja at 3/27/2006 10:55:26 AM
I have UPC and ItemNo as columns in my DataTable dt. How do I sort the columns in my method prior to return dt; I tried the following but it doesn't seem to work. dt.DefaultView.Sort = "UPC ASC"; return dt; Necqui ...more >>

UI thread or worker thread?
Posted by hagarwal NO[at]SPAM tamaleresearch.com at 3/27/2006 10:55:20 AM
If I instantiate a Form object on a worker thread: 1. Will that object be owned by the worker thread or the UI thread? 2. What will object.InvokeRequired return if called in the worker thread? 3. Do I need to use Invoke to show the Form? Thanks Harsh ...more >>

Default icon for window
Posted by UJ at 3/27/2006 10:47:04 AM
Is there a way to change the default icon for a window to be the application icon? It's just that if you create a new window you have to remember to go in and set the icon where it would be nice if it defaulted to the application icon. TIA - Jeff. ...more >>

Visual C++ 7.0 and C#.NET
Posted by Lubomir at 3/27/2006 9:17:03 AM
Hi, I would like to ask, if the app written in MS VC++7.0 can cooperate with a module written in C#.NET. If yes, what is needed to do to make it works? Thanks, Lubomir...more >>

Properly checking for nulls
Posted by Brett Romero at 3/27/2006 8:50:26 AM
What is a better way for checking nulls than using the "==" operator? For example, .Equals() is better than == for most operations since it knows the type being checked. However, it doesn't seem to work for nulls. For example: object myobject = new object(); myobje...more >>

int [] Array Question
Posted by Galahad at 3/27/2006 8:42:02 AM
I am using the code below to create a integer array. while(dr.Read()) { string StateID=dr["StateID"].ToString(); int FacilityID=Convert.ToInt32(dr["FacilityID"].ToString()); int [] FacilityIDs={FacilityID}; } However, the last line int [] FacilityIDs={FacilityID}; only adds on value...more >>

struct with string, where does it allocate to? heap?
Posted by haitao.song NO[at]SPAM gmail.com at 3/27/2006 8:20:20 AM
Hi, As it is always stated that value type is allocated on stack, while reference types are on managed heap. How about the struct with string members? stuct A { string str; } String type is considered as reference type.... My guess is the struct A is actually a valuetype with a string refe...more >>

Problem HttpWebRequest from asp.net app
Posted by Darren at 3/27/2006 8:06:02 AM
I created a class to submit an xml document to a webpage. When I use my class in a console application, everything submits correctly. However, when I attempt to use my class from an asp.net webpage, then it always gives me this exception The underlying connection was closed: Unable to conn...more >>

System.IO errors when accessing MP3 via filestream?
Posted by Tina at 3/27/2006 7:25:31 AM
Hello: When users access my page to listen to an MP3 file, I send them to an ASPX page that does some necessary server-side database logging first and then returns the MP3 file using the filestream object. It works for the most part, but when I check my error logs, it's clear not everyone i...more >>

Outlook warning
Posted by kimberly.walker NO[at]SPAM consultant.com at 3/27/2006 6:14:05 AM
Im creating an application that will when a user emails the company's at helpdesk@companysname.com this application will get the email and then place it in SQL Server. Everything works fine but everytime the application runs in order for me to get the email Outlook generates a warning letting m...more >>

'Safe' int parsing
Posted by Chris S. at 3/27/2006 5:05:31 AM
I'm regularly having to turn a string into an int, for web applications. I'm wondering if there is a faster way of doing the following code: private int ParseInt(string s) { try { int i = int.Parse(s); return i; } catch { return 0; } } I obviously don't want an excepti...more >>

How can I display info text in my dialoge form?
Posted by garyusenet NO[at]SPAM myway.com at 3/27/2006 4:33:08 AM
I want to display some informational text in a dialog something along the lines of 'enter your text in the below box and press OK to save, or Cancel to exit'. I'm using a textbox to display this is that the right way to do it? The user doesn't enter text into this, it's just informational so I...more >>

Loading access query from vb6
Posted by johncontact NO[at]SPAM eircom.net at 3/27/2006 3:49:55 AM
I am using vb6 on xp and i want to load an access query from a command button. I am new to vb and i need help. My access database is called Garage and the query is called CARS. Any help please ...more >>

Basic Variable Scope Question
Posted by (arcticool NO[at]SPAM hotmail.com) at 3/27/2006 3:48:03 AM
Fields vs. Local Variables- as I understand a Field (declared inside a class) can share data across methods in the class, and to other classis (if declared public) where local variables (declared inside a method) are scoped only within the method. So my question is: what would be the point ...more >>

How to find file versions using C#
Posted by Kondapanaidu at 3/27/2006 3:48:01 AM
Hi, How to find the File Versions using C#. I am using .NET1.1, WIN2K Professional. Thanks in advance... regards *** Sent via Developersdex http://www.developersdex.com ***...more >>

Notification area
Posted by KVERMEE at 3/27/2006 3:37:01 AM
Hi I have an external application running in the background. When it starts it, adds an icon to the notification area (system tray). The application monitors some things and show messages. The icon will start to blink if there is a new messages, so the user can double click the icon and the m...more >>

unable to drag the cutom server control (button) on webform
Posted by prasadrmarathe NO[at]SPAM gmail.com at 3/27/2006 3:06:41 AM
Hi, I have created one custom buton server control which will shown on it the nuber of time it was clicked as its text. I have added the custom control in my another projects tool box but i am unable to drag the custom control on my webform. can u please tell what the problem is . i have ...more >>

Timespan values - not negative?
Posted by Chris Ashley at 3/27/2006 1:01:59 AM
coverDate = DateTime.Parse(objQuote.GetValue("coverStartDate")); daysDiff = System.DateTime.Now.Subtract(coverDate); I'm using this code trying to calculate the day difference between two dates. However, daysDiff.days always returns a positive integer, irrespective of whether the day is ...more >>

error when converting string decimal to integer
Posted by mdawoodk NO[at]SPAM gmail.com at 3/27/2006 12:50:12 AM
i am getting error "input string was not in correct format" when converting a string decimal into integer value. code is like this: string strVal = ""; int nVal = 0; strVal = "14.9"; nVal += Convert.toInt32(strVal); Above code is a function which is in a dll and its return type ...more >>

Simple database - what's the easiest way to implement?
Posted by garyusenet NO[at]SPAM myway.com at 3/27/2006 12:45:41 AM
Hi all, Im in the process of writing a simple application. I have a form which has on it five text boxes. I would like to store information that is entered into these text boxes in a small database. My question is what is the simplest most effective way of doing this? I've heard over the...more >>

word documents; save to sql server; table design
Posted by Iwan Petrow at 3/27/2006 12:33:07 AM
Hi, I have many Word documents and I want to insert them in sql server database. How to design the table so I want to search in Word documents for some phrases? Thanks. ...more >>

JIT Debugging failed with the following error: 0x800405a6
Posted by harish at 3/27/2006 12:22:59 AM
Hello all, I am trying to use C# assembly /dll (which has public methods and events), ... trying to use it through a VB6 client.. I get the error, JIT Debugging failed with the following error: 0x800405a6 what seems to me is like the error occurs when an event is fired from .net code... s...more >>

Treeview Control - and saving it's nodes...
Posted by garyusenet NO[at]SPAM myway.com at 3/27/2006 12:16:26 AM
Hi All, I'm eagerly anticipating what you have to say on something that's stumped me over the weekend. I'm writing a small application which utilises a treeview control. I've figured out how to programatically add nodes to it, but everytime the program is exited the treeview control resets it...more >>

Blogs Creation
Posted by Rupesh at 3/27/2006 12:13:45 AM
Hi, I am looking for sample code for blog using Asp.net(C#). If someone has code for creating blogs pls let me know. ...more >>

Blogs Creation
Posted by Rupesh at 3/27/2006 12:13:26 AM
Hi, I am looking for sample code for blog using Asp.net(C#). If someone has code for creating blogs pls let me know. ...more >>

Improving perfromance
Posted by perspolis at 3/27/2006 12:00:00 AM
Hi all I have a application that connects to a sql server database. I have many rows about above 100,000 records and when I want to fill my sqlDataAdaptor and show results in a grid it takes above 15s,how Can I improve this ?? Is this a good way to fill million of records in fewer time?? t...more >>

Visual Studio C# Express - MySQL
Posted by Iain at 3/27/2006 12:00:00 AM
Hi Is it possible to get Visual Studio C# Express (beta 2) connecting to a MySQL database? TIA Iain ...more >>

Does socket has 2 streams ? What is "(a)synchronous"? Will BeginReceive() creates too many threads so hurt performance?
Posted by Ryan Liu at 3/27/2006 12:00:00 AM
TcpClient has a method called GetworkStream GetStream(); So in other words, there is only one stream associate with it for input and output, right? So while it is receiving, it can not send, and vise visa, right? So will it be a problem both server and client can initiative a sending action? ...more >>

The connection string in WebApp and class library
Posted by ad at 3/27/2006 12:00:00 AM
I have a web application and a class library in a solution. The class library is make of typed datasets, and include many Table in it. The connection strings of the TableAdapters is come from the app.config of that class library. The Web application refer the class library, and the connect...more >>

Regex for legal file name chars
Posted by WLT at 3/27/2006 12:00:00 AM
I need to filter out non-legal characters from potential (user-entered) file names. Certainly this must exist already. Also...I remember there was a large cache of regex strings online somewhere but I can't remember the site name. It wasn't regex.com (though there is a nice fuzzy animal ther...more >>

How do I find database server's name?
Posted by Jim at 3/27/2006 12:00:00 AM
Just installed MSDE on computer and am trying to activate the Northwind database. When I make an entry for "Select or enter a server name:" should I use something like (local)\MSSQLServer, where (local) specifies the machine's name? Or more to the point, how do I determine the name of th...more >>

DataSet & DataView
Posted by beachboy at 3/27/2006 12:00:00 AM
Hello all, I am using the DataSet & DataView to display the file name in specify directory e.g: 112005.html , 022006.html, 052005.html i can create a datatable by fileinfo and insert all file name which is divied into month and year columns then i can put the sorted dataview into datalist ...more >>


DevelopmentNow Blog