Show / Hide Table of Contents

Class BlittableValueType

Checks whether the specified type parameter is a blittable value type.

Inheritance
System.Object
BlittableValueType
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.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
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.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX