TypeUtil Class |
Namespace: Nova.Utilities
public static class TypeUtil
The TypeUtil type exposes the following members.
Name | Description | |
---|---|---|
ChangeType |
Change the specified object to the specified type, forcing larger integers into smaller ones without exceptions.
| |
FindExtensionMethods |
Search for extension methods on the type with the specified name.
| |
FindTypeArgument |
Find a type argument for the specified type parameter.
| |
FindTypeArgumentInBase |
Find a type argument in a base class for the specified type parameter.
| |
FindTypeParameterIndex |
Find the index of the specified type parameter.
| |
GetDelegateParameters |
Get the parameters for a delegate type.
| |
GetDelegateReturnType |
Get the return type for a delegate type.
| |
GetEventExt |
Search for an event by name. Unlike GetEvent(), searches base interfaces.
| |
GetIndexerExt |
Search for an indexer by parameter types. Unlike GetIndexer(), does 'loose' matching on generic arameter types, and searches base interfaces.
| |
GetInvokeMethod |
Get the 'Invoke()' method for the specified Type.
| |
GetLocalGenericArgumentCount |
Get the number of local generic arguments for the type, NOT including arguments from any enclosing generic types.
| |
GetLocalGenericArguments |
Get the local generic arguments for the type, NOT including arguments from any enclosing generic types.
| |
GetMethodExt(Type, String, Type) |
Search for a method by name and parameter types. Unlike GetMethod(), does 'loose' matching on generic
parameter types, and searches base interfaces.
| |
GetMethodExt(Type, String, BindingFlags, Type) |
Search for a method by name, parameter types, and binding flags. Unlike GetMethod(), does 'loose' matching on generic
parameter types, and searches base interfaces.
| |
GetPropertyExt |
Search for a property by name. Unlike GetProperty(), searches base interfaces.
| |
HasSameTypeArguments |
Determine if this type has the same type arguments as the specified type.
| |
IsBitFlagsEnum |
Determine if the type is a bit-flags style enum.
| |
IsComImport |
True if the type is a COM Import.
| |
IsDelegateType |
Determine if the type is a delegate type.
| |
IsFixedBufferType |
Determine if the type is a fixed-buffer type.
| |
IsImplementationOf |
Determine if the type implements the specified interface. If a generic interface is specified, and
it's not the generic type definition of the interface, then the type arguments are also compared.
| |
IsInternal |
Return true if the type is internal, otherwise false.
| |
IsNullableType |
Determine if the type is a nullable type.
| |
IsPrivate |
Return true if the type is private, otherwise false.
| |
IsProtected |
Return true if the type is protected, otherwise false.
| |
IsStatic |
Return true if the type is static, otherwise false.
| |
IsUserClass |
Determine if the type is a user-defined class (excludes 'object' and 'string').
| |
IsUserStruct |
Determine if the type is a user-defined struct (excludes primitive types including 'void' and 'decimal', and enums).
| |
MakeArrayType |
Make an array type.
| |
NonGenericName |
Returns the name without any trailing '`' and type parameter count.
|
Name | Description | |
---|---|---|
ComImportAttributeName |
The name of the ComImport attribute.
| |
FlagsAttributeName |
The name of the flags attribute.
|