Click or drag to resize

BinaryConvert Class

Changes the .Net type of a value.
Inheritance Hierarchy
SystemObject
  Demo3D.IOBinaryConvert

Namespace:  Demo3D.IO
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 18.03.00
Syntax
C#
public static class BinaryConvert

The BinaryConvert type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCanConvert
Returns true if ConvertType can perform a conversion.
Public methodStatic memberChangeType(BinaryString, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Boolean, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Byte, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Char, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Double, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(IList, Type, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Int16, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Int32, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Int64, TypeCode, BinaryConvertConversionType)
Changse a value to a different type.
Public methodStatic memberChangeType(Object, Type, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Object, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(SByte, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(Single, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(String, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(UInt16, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(UInt32, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberChangeType(UInt64, TypeCode, BinaryConvertConversionType)
Changes a value to a different type.
Public methodStatic memberConversionFunction
Returns a function to perform a conversion, or null if no conversion is possible.
Public methodStatic memberToDouble(Int32)
Bit conversion.
Public methodStatic memberToDouble(Int64)
Bit conversion.
Public methodStatic memberToDouble(UInt32)
Bit conversion.
Public methodStatic memberToDouble(UInt64)
Bit conversion.
Public methodStatic memberToInt16(Double)
Bit conversion.
Public methodStatic memberToInt16(Single)
Bit conversion.
Public methodStatic memberToInt32(Double)
Bit conversion.
Public methodStatic memberToInt32(Single)
Bit conversion.
Public methodStatic memberToInt64(Double)
Bit conversion.
Public methodStatic memberToInt64(Single)
Bit conversion.
Public methodStatic memberToSingle(Int32)
Bit conversion.
Public methodStatic memberToSingle(Int64)
Bit conversion.
Public methodStatic memberToSingle(UInt32)
Bit conversion.
Public methodStatic memberToSingle(UInt64)
Bit conversion.
Public methodStatic memberToUInt16(Double)
Bit conversion.
Public methodStatic memberToUInt16(Single)
Bit conversion.
Public methodStatic memberToUInt32(Double)
Bit conversion.
Public methodStatic memberToUInt32(Single)
Bit conversion.
Public methodStatic memberToUInt64(Double)
Bit conversion.
Public methodStatic memberToUInt64(Single)
Bit conversion.
Top
Remarks

Like System.Convert, except these methods won't throw an exception if the value overflows the target type. By default, all numerical values are converted numerically (ie integers are sign extended, and float to integer conversions are rounded, etc). For converting floating point to integers, use the BitConversion to convert the value bitwise, such that a direct memory copy (rather than a conversion of the numerical value) is returned.

Arrays are converted by converting all the elements of the array to the target type.

See Also