Tech Tutorials Database
GeekArticles Microsoft C#
 

Setting a default value for C# Auto-implemented properties

 
Author: codeproject.com
Category: C#
Comments (0)

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 |...

Read More...




Sponsored Links




Read Next: Counting lines in a string



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe