Is Accessible Field - CSharp System.Reflection

CSharp examples for System.Reflection:FieldInfo

Description

Is Accessible Field

Demo Code


using System.Reflection;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from w  w w  .j  av a 2 s.  c  o  m*/

public class Main{
        public static bool IsAccessibleField(this FieldInfo field)
        {
            return !field.IsStatic && !field.IsLiteral && !field.IsInitOnly;
        }
}

Related Tutorials