C# Class rencodesharp.BStruct

Afficher le fichier Open project: voltagex/junkcode Class Usage Examples

Méthodes publiques

Méthode Description
GetBytes ( Int32 value, byte buffer, int startIndex ) : void

Gets the bytes of an Int32.

GetBytes ( System.Int64 value, byte buffer, int startingIndex ) : void

Gets the bytes of an Int64.

Pack ( object x, int n ) : string

Pack the object 'x' into (network order byte format).

ToDouble ( byte value, int startIndex ) : double

Converts byte array to Double (64 bit float)

ToFloat ( byte value, int startIndex ) : float

Converts byte array to Float (32 bit float)

ToInt1 ( byte value, int startIndex ) : int

Converts byte array to INT1 (8 bit integer)

ToInt2 ( byte value, int startIndex ) : int

Converts byte array to INT2 (16 bit integer)

ToInt4 ( byte value, int startIndex ) : int

Converts byte array to INT4 (32 bit integer)

ToInt8 ( byte value, int startIndex ) : long

Converts byte array to INT8 (64 bit integer)

Unpack ( string x, int n ) : object

Unpack the string 'x' (network order byte format) into object.

Method Details

GetBytes() public static méthode

Gets the bytes of an Int32.
public static GetBytes ( Int32 value, byte buffer, int startIndex ) : void
value System.Int32
buffer byte
startIndex int
Résultat void

GetBytes() public static méthode

Gets the bytes of an Int64.
public static GetBytes ( System.Int64 value, byte buffer, int startingIndex ) : void
value System.Int64
buffer byte
startingIndex int
Résultat void

Pack() public static méthode

Pack the object 'x' into (network order byte format).
public static Pack ( object x, int n ) : string
x object
n int
Résultat string

ToDouble() public static méthode

Converts byte array to Double (64 bit float)
public static ToDouble ( byte value, int startIndex ) : double
value byte
startIndex int
Résultat double

ToFloat() public static méthode

Converts byte array to Float (32 bit float)
public static ToFloat ( byte value, int startIndex ) : float
value byte
startIndex int
Résultat float

ToInt1() public static méthode

Converts byte array to INT1 (8 bit integer)
public static ToInt1 ( byte value, int startIndex ) : int
value byte
startIndex int
Résultat int

ToInt2() public static méthode

Converts byte array to INT2 (16 bit integer)
public static ToInt2 ( byte value, int startIndex ) : int
value byte
startIndex int
Résultat int

ToInt4() public static méthode

Converts byte array to INT4 (32 bit integer)
public static ToInt4 ( byte value, int startIndex ) : int
value byte
startIndex int
Résultat int

ToInt8() public static méthode

Converts byte array to INT8 (64 bit integer)
public static ToInt8 ( byte value, int startIndex ) : long
value byte
startIndex int
Résultat long

Unpack() public static méthode

Unpack the string 'x' (network order byte format) into object.
public static Unpack ( string x, int n ) : object
x string
n int
Résultat object