Click or drag to resize

ExtToT Method

Converts the specified array of Byte to the specified type data.

Namespace:  Sfs2X.WebSocketSharp
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public static T To<T>(
	this byte[] source,
	ByteOrder sourceOrder
)
where T : struct, new()

Parameters

source
Type: SystemByte
An array of Byte to convert.
sourceOrder
Type: Sfs2X.WebSocketSharpByteOrder
One of the ByteOrder enum values, specifies the byte order of source.

Type Parameters

T
The type of the return. The T must be a value type.

Return Value

Type: T
A T converted from source, or a default value of T if source is an empty array of Byte or if the type of T isn't Boolean, Char, Double, Single, Int32, Int64, Int16, UInt32, UInt64, or UInt16.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is .
See Also