Is Field Or Prop - CSharp System.Reflection

CSharp examples for System.Reflection:FieldInfo

Description

Is Field Or Prop

Demo Code


using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;// w  w w  .  j a  v  a  2s  . c om

public class Main{
        public static bool IsFieldOrProp(this MemberInfo member)
      {
         return member is FieldInfo || member is PropertyInfo;
      }
}

Related Tutorials