GeekArticles
Microsoft
C#
Microsoft
C#Setting a default value for C# Auto-implemented properties
While leaving aside the performance penalties, it is a reasonable approach to make code cleaner.Though you can further benefit from the extension methods:public static void InitDefaults(this object o){ PropertyInfo[] props = o.GetType().GetProperties(BindingFlags.Public |...
Sponsored Links
Read Next: Counting lines in a string
Related Topics
