Class BlittableValueType
Checks whether the specified type parameter is a blittable value type.
Inheritance
Inherited Members
Namespace: OpenTK
Assembly: cs.temp.dll.dll
Syntax
public static class BlittableValueType
Remarks
A blittable value type is a struct that only references other value types recursively, which allows it to be passed to unmanaged code directly.
Methods
Check<T>(T)
Checks whether type is a blittable value type.
Declaration
public static bool Check<T>(T type)
Parameters
Type | Name | Description |
---|---|---|
T | type | An instance of the type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if T is blittable; false otherwise. |
Type Parameters
Name | Description |
---|---|
T |
Check<T>(T[])
Checks whether type is a blittable value type.
Declaration
[CLSCompliant(false)]
public static bool Check<T>(T[] type)
Parameters
Type | Name | Description |
---|---|---|
T[] | type | An instance of the type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if T is blittable; false otherwise. |
Type Parameters
Name | Description |
---|---|
T |
Check<T>(T[][])
Checks whether type is a blittable value type.
Declaration
[CLSCompliant(false)]
public static bool Check<T>(T[][] type)
Parameters
Type | Name | Description |
---|---|---|
T[][] | type | An instance of the type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if T is blittable; false otherwise. |
Type Parameters
Name | Description |
---|---|
T |
Check<T>(T[,,])
Checks whether type is a blittable value type.
Declaration
[CLSCompliant(false)]
public static bool Check<T>(T[,, ] type)
Parameters
Type | Name | Description |
---|---|---|
T[,,] | type | An instance of the type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if T is blittable; false otherwise. |
Type Parameters
Name | Description |
---|---|
T |
Check<T>(T[,])
Checks whether type is a blittable value type.
Declaration
[CLSCompliant(false)]
public static bool Check<T>(T[, ] type)
Parameters
Type | Name | Description |
---|---|---|
T[,] | type | An instance of the type to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if T is blittable; false otherwise. |
Type Parameters
Name | Description |
---|---|
T |
StrideOf<T>(T)
Returns the size of the specified value type in bytes or 0 if the type is not blittable.
Declaration
public static int StrideOf<T>(T type)
Parameters
Type | Name | Description |
---|---|---|
T | type | An instance of the value type. |
Returns
Type | Description |
---|---|
System.Int32 | An integer, specifying the size of the type in bytes. |
Type Parameters
Name | Description |
---|---|
T | The value type. Must be blittable. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Occurs when type is not blittable. |
StrideOf<T>(T[])
Returns the size of a single array element in bytes or 0 if the element is not blittable.
Declaration
[CLSCompliant(false)]
public static int StrideOf<T>(T[] type)
Parameters
Type | Name | Description |
---|---|---|
T[] | type | An instance of the value type. |
Returns
Type | Description |
---|---|
System.Int32 | An integer, specifying the size of the type in bytes. |
Type Parameters
Name | Description |
---|---|
T | The value type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Occurs when type is not blittable. |
StrideOf<T>(T[,,])
Returns the size of a single array element in bytes or 0 if the element is not blittable.
Declaration
[CLSCompliant(false)]
public static int StrideOf<T>(T[,, ] type)
Parameters
Type | Name | Description |
---|---|---|
T[,,] | type | An instance of the value type. |
Returns
Type | Description |
---|---|
System.Int32 | An integer, specifying the size of the type in bytes. |
Type Parameters
Name | Description |
---|---|
T | The value type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Occurs when type is not blittable. |
StrideOf<T>(T[,])
Returns the size of a single array element in bytes or 0 if the element is not blittable.
Declaration
[CLSCompliant(false)]
public static int StrideOf<T>(T[, ] type)
Parameters
Type | Name | Description |
---|---|---|
T[,] | type | An instance of the value type. |
Returns
Type | Description |
---|---|
System.Int32 | An integer, specifying the size of the type in bytes. |
Type Parameters
Name | Description |
---|---|
T | The value type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Occurs when type is not blittable. |