Class TypeUtilityExtensions
This is an extension implementation of the most common methods on the TypeUtility class.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class TypeUtilityExtensions
Methods
| Improve this DocIs<T>(Object)
Determines whether the specified source
is of T
.
Declaration
public static bool Is<T>(this object source)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | The object to compare with |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type to compare with |
IsNot<T>(Object)
Determines whether the specified source
is not of T
.
Declaration
public static bool IsNot<T>(this object source)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | The object to compare with |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type to compare with |
IsNullable<T>(T)
Determines whether the specified source is a nullable System.ValueType.
Declaration
public static bool IsNullable<T>(this T source)
Parameters
Type | Name | Description |
---|---|---|
T | source | The source type to check for nullable System.ValueType. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of the |
IsNullable<T>(Nullable<T>)
Determines whether the specified source is a nullable System.ValueType.
Declaration
public static bool IsNullable<T>(this T? source)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<T> | source | The source type to check for nullable System.ValueType. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of the |