Is Writable Property - CSharp System.Reflection

CSharp examples for System.Reflection:PropertyInfo

Description

Is Writable Property

Demo Code


using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;/*  w w  w .  java 2 s.com*/

public class Main{
        public static bool IsWritable(this PropertyInfo propertyInfo)
        {
            return propertyInfo.CanWrite && propertyInfo.GetSetMethod(false) != null;
        }
}

Related Tutorials