Top ".net" questions

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

How to get the type of T from a member of a generic class or method?

Let say I have a generic member in a class or method, so: public class Foo<T> { public …

c# .net generics
How to open .dll files to see what is written inside?

I lost the solution of class-library, can I open .dll file which is created by class-library.

c# .net class-library
How to Convert JSON object to Custom C# object?

Is there an easy way to populate my C# Object with the JSON object passed via AJAX? This is the …

c# asp.net .net ajax json
Using LINQ to remove elements from a List<T>

Say that I have LINQ query such as: var authors = from x in authorsList where x.firstname == "Bob" select x; …

c# .net linq list
In C#, how do I calculate someone's age based on a DateTime type birthday?

Given a DateTime representing a person's birthday, how do I calculate their age in years?

c# .net datetime
How do I get the path of the assembly the code is in?

Is there a way to get the path for the assembly in which the current code resides? I do not …

c# .net reflection mbunit
Best way to get application folder path

I see that there are some ways to get the application folder path: Application.StartupPath System.IO.Path.GetDirectoryName( System.…

c# .net
URL Encoding using C#

I have an application which sends a POST request to the VB forum software and logs someone in (without setting …

c# .net urlencode
How do you sort a dictionary by value?

I often have to sort a dictionary, consisting of keys & values, by value. For example, I have a hash …

c# .net sorting dictionary
Invalid postback or callback argument. Event validation is enabled using '<pages enableEventValidation="true"/>'

I am getting the following error when I post back a page from the client-side. I have JavaScript code that …

.net asp.net .net-2.0 postback argumentexception