Where Is Machine.Config?

32-bit 64-bit [version] should be equal to v1.0.3705, v1.1.4322, v2.0.50727 or v4.0.30319. v3.0 and v3.5 just contain additional assemblies to v2.0.50727 so there should be no config\machine.config. v4.5.x and v4.6.x are stored inside v4.0.30319.

How does the “Using” statement translate from C# to VB?

Using has virtually the same syntax in VB as C#, assuming you’re using .NET 2.0 or later (which implies the VB.NET v8 compiler or later). Basically, just remove the braces and add a “End Using” You can get the full documentation here http://msdn.microsoft.com/en-us/library/htd05whh(VS.80).aspx EDIT If you’re using VS2003 or earlier you’ll need the below code. … Read more

What’s the difference between struct and class in .NET?

In .NET, there are two categories of types, reference types and value types. Structs are value types and classes are reference types. The general difference is that a reference type lives on the heap, and a value type lives inline, that is, wherever it is your variable or field is defined. A variable containing a value type contains the entire value type value. For a struct, that means that … Read more

Why is Dictionary preferred over Hashtable in C#?

For what it’s worth, a Dictionary is (conceptually) a hash table. If you meant “why do we use the Dictionary<TKey, TValue> class instead of the Hashtable class?”, then it’s an easy answer: Dictionary<TKey, TValue> is a generic type, Hashtable is not. That means you get type safety with Dictionary<TKey, TValue>, because you can’t insert any random object into it, and you don’t have to cast the … Read more

Windows Application has stopped working :: Event Name CLR20r3

I developed an applicatin using Visual Studio.Net 2008 Team System with Infragistics Net Advantage Tools 2010.3 and made a Setup Exe file for my application and installed on client machines where they have both Windows7 32 bit and WindowsXP Service Pack 2. ( I have also tried both way by Setup Property TargetPlatform x86 and … Read more

.NET Core vs ASP.NET Core

Update 2020: Do note that ASP.NET Core 3 and higher now depend on .NET Core and can no longer be used on .NET Framework. The below description is for ASP.NET Core 1.x-2.x; the layer separation still holds true for ASP.NET Core 3.0 but the ASP.NET Core layer can no longer be used on top of … Read more

Convert Enum to String

As of C#6 the best way to get the name of an enum is the new nameof operator: This works at compile time, with the enum being replaced by the string in the compiled result, which in turn means this is the fastest way possible. Any use of enum names does interfere with code obfuscation, if you … Read more