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# > october 2007 > threads for sunday october 21

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

2.0+ Events Handled by 1.x Subscribers
Posted by Robert Cramer at 10/21/2007 11:12:45 PM
Given that Generics are available only in .NET 2.0+ and not in 1.x.... If a .NET 2.0+ event publisher were to make use of System.EventHandler<T>, or otherwise make use of Generics, in its event implementation, would that preclude a .NET 1.x app from subscribing to and handling that event? ...more >>

Fire event in the same thread as the UI like BackgroundWorker
Posted by Sin Jeong-hun at 10/21/2007 5:26:27 PM
This is what I've always been wondered. Suppose I've created a class named Agent, and the Agent does some lengthy job. Of course I don't want to block the main window, so the Agent does the job in a separate thread. If the job is progressed it fires an event, and the main window handled the even...more >>

Redirect lengthy application's output?
Posted by Sin Jeong-hun at 10/21/2007 4:35:27 PM
Process p = new Process(); p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.Start(); p.StandardOutput.ReadToEnd(); This works if the application outputs very little amount of string and exits quickly. But what if the application does a lengthy job and output...more >>

Regex OnKeyDown question
Posted by el_squid_2000 NO[at]SPAM yahoo.com at 10/21/2007 11:00:38 AM
Hi - I have a regex defined as [^A-Z0-9] and I am trying to allow only uppercase alphanumeric input in a textbox. So I have Uppercasing set to true elsewhere in the program and I have an OnKeyDown event handler with e.SuppressKeyPress = false; if (myRegex.IsMatch(e.KeyData.ToString())) ...more >>

How to continue using a Socket after a timeout?
Posted by carl.rosenberger NO[at]SPAM gmail.com at 10/21/2007 8:16:24 AM
Hi, I am trying to get the following behaviour for my Socket connection: (1) Attempt a blocked read for a defined amount of time. (2) If a timeout occurs, because no data has been sent to the socket, throw an exception. (3) Catch the exception and either go back to (1) or quit reading, dep...more >>

How to get expand the height of ListView control so that no scrollbars will show?
Posted by deerchao at 10/21/2007 5:12:14 AM
I set ListView.Dock to Top, but how can I get the desired height to avoid it to show vertical scrollbar? I mean is there something like ListView.ClientSize or ListView.VirtualHeight? Thanks! ...more >>

Scanning hard drive
Posted by Rotsey at 10/21/2007 12:00:00 AM
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took 13min on my 60 GB drive. I wanted it to be quicker. So the second time I changed the class to a str...more >>

Random Number Generation
Posted by Anil Gupte at 10/21/2007 12:00:00 AM
I had someone write a random number generator in C# (I am more of a VB programmer) and they came up with the following: public string GetRand(int count) { string number = ""; for (int i=0; i<count; i++) { Random Rnd = new Random(); number = number+Convert.ToString(Rnd.Next(0,9)); } retu...more >>



LoadLibrary not working on Vista64?
Posted by Peter Morris at 10/21/2007 12:00:00 AM
I have a class named DynamicLinkLibrary which does this: [DllImport("kernel32.dll")] private static extern IntPtr LoadLibrary(string fileName); protected virtual void Load(string fileName) { EnsureNotDisposed(); if (LibraryHandle != IntPtr.Zero) throw new InvalidOperatio...more >>

Nunit: Where does the .config file go?
Posted by chris at 10/21/2007 12:00:00 AM
I have created a file, called nunit_project_name.dll.config, within the bin folder of my Nunit project, but Nunit is not able to find the file. Is this is the right location? I can access the proper connection string if I put in in the machine.config file, but obviously this is not the best c...more >>


DevelopmentNow Blog