Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

If my interface must return Task what is the best way to have a no-operation implementation?

In the code below, due to the interface, the class LazyBar must return a task from its method (and for …

c# .net task-parallel-library async-await threadpool
What is the difference between ManualResetEvent and AutoResetEvent in .NET?

I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through …

c# .net multithreading autoresetevent manualresetevent
Performance of Arrays vs. Lists

Say you need to have a list/array of integers which you need iterate frequently, and I mean extremely often. …

.net performance arrays generics list
How to convert "0" and "1" to false and true

I have a method which is connecting to a database via Odbc. The stored procedure which I'm calling has a …

c# .net asp.net odbc boolean-logic
What is the difference between IQueryable<T> and IEnumerable<T>?

What is the difference between IQueryable<T> and IEnumerable<T>? See also What's the difference between …

.net linq .net-3.5 ienumerable iqueryable
What difference is there between WebClient and HTTPWebRequest classes in .NET?

What difference is there between the WebClient and the HttpWebRequest classes in .NET? They both do very similar things. In …

c# .net httpwebrequest webclient
Differences between .NET 4.0 and .NET 4.5 in High level in .NET

Eager to know Differences between .NET 4.0 and .NET 4.5 in High level in .NET and also differences in ASP.NET, C# …

.net .net-4.0 .net-4.5
How to fix the datetime2 out-of-range conversion error using DbContext and SetInitializer?

I'm using the DbContext and Code First APIs introduced with Entity Framework 4.1. The data model uses basic data types such …

c# .net entity-framework ef-code-first dbcontext
How do I use reflection to invoke a private method?

There are a group of private methods in my class, and I need to call one dynamically based on an …

c# .net reflection private-methods
Compare two objects' properties to find differences?

I have two objects of the same type, and I want to loop through the public properties on each of …

c# .net