Class TypeExtensions
type 扩展方法
Inherited Members
Namespace: Lett.Extensions
Assembly: Lett.Extensions.dll
Syntax
public static class TypeExtensions
Methods
| Improve this Doc View SourceHasProperty(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 |