New Warning CS1060 in C# 3 (Visual Studio 2008)
Recompiling C# 2 (Visual Studio 2005) code in C# 3 (Visual Studio 2008), you may incounter a new warning that didn’t used to ocur: Warning CS1060: Use of possibly unassigned field ‘fieldName’. Struct instance variables are initially unassigned if struct is unassigned. Dealing strictly with syntax, C# let’s you declare a value type (struct) with a reference member, for example: namespace Examples{ using System.Drawing; public static class Program { public static void Main() { LabelEntry labelEntry; labelEntry.Location.Point.X = 0; } } public struct LabelEntry { public LabelLocation Location; public String Label; … Continue reading New Warning CS1060 in C# 3 (Visual Studio 2008)