C# – Property snippet

0 Comments

Some C# code snippets for C# properties: /// <summary> /// A object property with null check /// </summary> private Type _propertyName = null; public Type PropertyName { get { if(_propertyName == null) { throw new