LINQ on the .NET 2.0 Runtime

It’s weird that no one has mentioned LINQBridge. This little awesome project is a backport of LINQ (IEnumerable, but without IQueryable) and its dependencies (Func, Action, etc) to .NET 2.0. And: If your project references LINQBridge during compilation, then it will bind to LINQBridge’s query operators; if it references System.Core during compilation, then it will … Read more

Are C# uninitialized variables dangerous?

I am under the impression that there are not truly “unassigned” values allowed by the runtime. In particular that a reference type that is not initialized will always have a null value, never the value left over from a previous invocation of the method or random value. Is this correct? I note that no one … Read more

How do ValueTypes derive from Object (ReferenceType) and still be ValueTypes?

C# doesn’t allow structs to derive from classes Your statement is incorrect, hence your confusion. C# does allow structs to derive from classes. All structs derive from the same class, System.ValueType, which derives from System.Object. And all enums derive from System.Enum. UPDATE: There has been some confusion in some (now deleted) comments, which warrants clarification. … Read more