Type
HasOwnProperty
Gets a value indicating whether public non-static property with a specified name occurs directly within this type.
private class Foo
{
public Bar BarProperty { get; set; }
public int BarField;
}
public class Bar
{
public int BarId { get; set; }
}
typeof(Foo).HasOwnProperty("BarProperty") // ---> true
typeof(Foo).HasOwnProperty("BarProperty.BarId") // ---> falseHasNestedProperty
Gets a value indicating whether property with a specified name occurs within this type or its "nested" types.
typeof(Foo).HasNestedProperty("BarProperty.BarId") // ---> trueIsNullableEnum
Gets a value indicating whether source type is nullable enumeration.
GetPropertyInfo
Returns PropertyInfo by full property name or null if no property was found.
IsAssignableFromGenericType
Determines whether an instance of a specified type can be assigned to an instance of the current type taking into account generic nature of specified type.
Last updated
Was this helpful?