Class TypeExtensions
Inheritance
System.Object
TypeExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: JK.Common.Extensions
Assembly: JK.Common.dll
Syntax
public static class TypeExtensions
Methods
| Improve this Doc View SourceDoesImplement<T>(Type)
Determines whether or not a type implements the given interface.
Declaration
public static bool DoesImplement<T>(this Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Type to check for the interface. |
Returns
Type | Description |
---|---|
System.Boolean | True if implemented, otherwise false. |
Type Parameters
Name | Description |
---|---|
T | Interface type to find. |
GetTypeFromEntity(Type)
Declaration
public static Type GetTypeFromEntity(this Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
System.Type |
IsNullable(Type)
Determines whether or not a type uses System.Nullable<T>, aka T?
Declaration
public static bool IsNullable(this Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check |
Returns
Type | Description |
---|---|
System.Boolean | True if System.Nullable<T>, otherwise false |