Changes the .Net type of a value.
Inheritance Hierarchy
Namespace:
Demo3D.IO
Assembly:
Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntaxpublic static class BinaryConvert
The BinaryConvert type exposes the following members.
Methods|
| Name | Description |
|---|
  | CanConvert |
Returns true if ConvertType can perform a conversion.
|
  | ChangeType(BinaryString, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Boolean, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Byte, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Char, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Double, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(IList, Type, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Int16, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Int32, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Int64, TypeCode, BinaryConvertConversionType) |
Changse a value to a different type.
|
  | ChangeType(Object, Type, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Object, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(SByte, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(Single, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(String, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(UInt16, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(UInt32, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ChangeType(UInt64, TypeCode, BinaryConvertConversionType) |
Changes a value to a different type.
|
  | ConversionFunction |
Returns a function to perform a conversion, or null if no conversion is possible.
|
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