Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Runtime.​Serialization.​IFormatterConverter
Assembly: System.Runtime
Provides the connection between an instance of <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and the formatter-provided class best suited to parse the data inside the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> .
Methods
public
object
Convert​(object value,
Type type)
value
The object to be converted.
type
The <see cref="T:System.Type" /> into which <paramref name="value" /> is to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to the given <see cref="T:System.Type" /> .
public
object
Convert​(object value,
TypeCode typeCode)
value
The object to be converted.
typeCode
The <see cref="T:System.TypeCode" /> into which <paramref name="value" /> is to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to the given <see cref="T:System.TypeCode" /> .
public
bool
ToBoolean​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a <see cref="T:System.Boolean" /> .
public
byte
ToByte​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to an 8-bit unsigned integer.
public
char
ToChar​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a Unicode character.
public
DateTime
ToDateTime​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a <see cref="T:System.DateTime" /> .
public
decimal
ToDecimal​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a <see cref="T:System.Decimal" /> .
public
double
ToDouble​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a double-precision floating-point number.
public
short
ToInt16​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 16-bit signed integer.
public
int
ToInt32​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 32-bit signed integer.
public
long
ToInt64​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 64-bit signed integer.
public
sbyte
ToSByte​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a <see cref="T:System.SByte" /> .
public
Single
ToSingle​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a single-precision floating-point number.
public
string
ToString​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a <see cref="T:System.String" /> .
public
ushort
ToUInt16​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 16-bit unsigned integer.
public
uint
ToUInt32​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 32-bit unsigned integer.
public
ulong
ToUInt64​(object value)
value
The object to be converted.
Returns The converted <paramref name="value" /> .
Converts a value to a 64-bit unsigned integer.