I’m trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected. In...
What is the quickest way to read a text file into a string variable? I understand it can be done in several ways, such as read individual bytes and...
When I use Response.Redirect(…) to redirect my form to a new page I get the error: A first chance exception of type ‘System.Threading.ThreadAbortException’ occurred in mscorlib.dll An exception of...
I have a generic method which has two generic parameters. I tried to compile the code below but it doesn’t work. Is it a .NET limitation? Is it possible...
I’m wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it...
I’ve added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error: Could not find default endpoint element that references contract...
The following code gives different output when running the release inside Visual Studio, and running the release outside Visual Studio. I’m using Visual Studio 2008 and targeting .NET 3.5....
What I have is an object that has an IsReadOnly property. If this property is true, I would like to set the IsEnabled property on a Button, ( for...
What is the difference between IQueryable<T> and IEnumerable<T>? See also What’s the difference between IQueryable and IEnumerable that overlaps with this question. 12 Answers 12
I have a WCF Service which returns 1000 records from database to the client. I have an ASP.NET WCF client (I have added service reference in asp.net web application...