C# Class FsControl.BaseLib.BitConverter

显示文件 Open project: gmpl/FsControl

Public Methods

Method Description
DoubleToInt64Bits ( double value ) : long
GetBytes ( bool value ) : byte[]
GetBytes ( char value, bool isLittleEndian ) : byte[]
GetBytes ( double value, bool isLittleEndian ) : byte[]
GetBytes ( float value, bool isLittleEndian ) : byte[]
GetBytes ( int value, bool isLittleEndian ) : byte[]
GetBytes ( long value, bool isLittleEndian ) : byte[]
GetBytes ( short value, bool isLittleEndian ) : byte[]
GetBytes ( uint value, bool isLittleEndian ) : byte[]
GetBytes ( ulong value, bool isLittleEndian ) : byte[]
GetBytes ( ushort value, bool isLittleEndian ) : byte[]
Int64BitsToDouble ( long value ) : double
ToBoolean ( byte value, int startIndex ) : bool
ToChar ( byte value, int startIndex, bool isLittleEndian ) : char
ToDouble ( byte value, int startIndex, bool isLittleEndian ) : double
ToInt16 ( byte value, int startIndex, bool isLittleEndian ) : short
ToInt32 ( byte value, int startIndex, bool isLittleEndian ) : int
ToInt64 ( byte value, int startIndex, bool isLittleEndian ) : long
ToSingle ( byte value, int startIndex, bool isLittleEndian ) : float
ToString ( byte value ) : String
ToString ( byte value, int startIndex ) : String
ToString ( byte value, int startIndex, int length ) : String
ToUInt16 ( byte value, int startIndex, bool isLittleEndian ) : ushort
ToUInt32 ( byte value, int startIndex, bool isLittleEndian ) : uint
ToUInt64 ( byte value, int startIndex, bool isLittleEndian ) : ulong

Private Methods

Method Description
GetHexValue ( int i ) : char

Method Details

DoubleToInt64Bits() public static method

public static DoubleToInt64Bits ( double value ) : long
value double
return long

GetBytes() public static method

public static GetBytes ( bool value ) : byte[]
value bool
return byte[]

GetBytes() public static method

public static GetBytes ( char value, bool isLittleEndian ) : byte[]
value char
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( double value, bool isLittleEndian ) : byte[]
value double
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( float value, bool isLittleEndian ) : byte[]
value float
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( int value, bool isLittleEndian ) : byte[]
value int
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( long value, bool isLittleEndian ) : byte[]
value long
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( short value, bool isLittleEndian ) : byte[]
value short
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( uint value, bool isLittleEndian ) : byte[]
value uint
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( ulong value, bool isLittleEndian ) : byte[]
value ulong
isLittleEndian bool
return byte[]

GetBytes() public static method

public static GetBytes ( ushort value, bool isLittleEndian ) : byte[]
value ushort
isLittleEndian bool
return byte[]

Int64BitsToDouble() public static method

public static Int64BitsToDouble ( long value ) : double
value long
return double

ToBoolean() public static method

public static ToBoolean ( byte value, int startIndex ) : bool
value byte
startIndex int
return bool

ToChar() public static method

public static ToChar ( byte value, int startIndex, bool isLittleEndian ) : char
value byte
startIndex int
isLittleEndian bool
return char

ToDouble() public static method

public static ToDouble ( byte value, int startIndex, bool isLittleEndian ) : double
value byte
startIndex int
isLittleEndian bool
return double

ToInt16() public static method

public static ToInt16 ( byte value, int startIndex, bool isLittleEndian ) : short
value byte
startIndex int
isLittleEndian bool
return short

ToInt32() public static method

public static ToInt32 ( byte value, int startIndex, bool isLittleEndian ) : int
value byte
startIndex int
isLittleEndian bool
return int

ToInt64() public static method

public static ToInt64 ( byte value, int startIndex, bool isLittleEndian ) : long
value byte
startIndex int
isLittleEndian bool
return long

ToSingle() public static method

public static ToSingle ( byte value, int startIndex, bool isLittleEndian ) : float
value byte
startIndex int
isLittleEndian bool
return float

ToString() public static method

public static ToString ( byte value ) : String
value byte
return String

ToString() public static method

public static ToString ( byte value, int startIndex ) : String
value byte
startIndex int
return String

ToString() public static method

public static ToString ( byte value, int startIndex, int length ) : String
value byte
startIndex int
length int
return String

ToUInt16() public static method

public static ToUInt16 ( byte value, int startIndex, bool isLittleEndian ) : ushort
value byte
startIndex int
isLittleEndian bool
return ushort

ToUInt32() public static method

public static ToUInt32 ( byte value, int startIndex, bool isLittleEndian ) : uint
value byte
startIndex int
isLittleEndian bool
return uint

ToUInt64() public static method

public static ToUInt64 ( byte value, int startIndex, bool isLittleEndian ) : ulong
value byte
startIndex int
isLittleEndian bool
return ulong