Show / Hide Table of Contents

    Class TypeExtensions

    type 扩展方法

    Inheritance
    Object
    TypeExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Lett.Extensions
    Assembly: Lett.Extensions.dll
    Syntax
    public static class TypeExtensions

    Methods

    | Improve this Doc View Source

    HasProperty(Type, String)

    是否包含 PropertyInfo (可访问的PropertyInfo)

    Declaration
    public static bool HasProperty(this Type this, string propertyName)
    Parameters
    Type Name Description
    Type this
    String propertyName

    属性名,忽略大小写

    Returns
    Type Description
    Boolean
    Examples
    public class Class1
    {
    public  string PropertyA { get; set; }
    private string PropertyB { get; set; }
    }
    Exceptions
    Type Condition
    ArgumentNullException
    ArgumentException
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 viacooky. All rights reserved.