Search Results

Search found 1 results on 1 pages for 'dhavalr'.

Page 1/1 | 1 

  • Properties are making trouble

    - by DhavalR
    In my application I have added a Properties.cs file which contains properties that I am would use through out the application. I am getting NullReferenceException = Object reference not set to an instance of an object. Here is the code for Properties.cs public class Properties { private static string type1; public static string Type1 { get { return type1; } set { type1= value; } } } And when I access this property in one of my form I am getting error. e.g. if (Properties.Type1.Equals(string.Empty) || Properties.Type1.Equals(null)) { //// Do something }

    Read the article

1