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;
        }