BoC.Extensions.TypeExtensions.PropertyExists C# (CSharp) 메소드

PropertyExists() 공개 정적인 메소드

public static PropertyExists ( this type, string propertyName ) : bool
type this
propertyName string
리턴 bool
        public static bool PropertyExists(this Type type, string propertyName)
        {
            if (type == null || propertyName == null)
            {
                return false;
            }
            return type.GetProperty(propertyName) != null;
        }