C#/XAML for HTML5 Documentation
C#/XAML for HTML5 Documentation
Reference
System
Convert Class
Convert Methods
ToInt16 Method
ToInt16 Method (Boolean)
ToInt16 Method (Byte)
ToInt16 Method (Char)
ToInt16 Method (DateTime)
ToInt16 Method (Decimal)
ToInt16 Method (Double)
ToInt16 Method (Int16)
ToInt16 Method (Int32)
ToInt16 Method (Int64)
ToInt16 Method (Object)
ToInt16 Method (SByte)
ToInt16 Method (Single)
ToInt16 Method (String)
ToInt16 Method (UInt16)
ToInt16 Method (UInt32)
ToInt16 Method (UInt64)
ToInt16 Method (Object, IFormatProvider)
ToInt16 Method (String, IFormatProvider)
ToInt16 Method (String, Int32)
Convert
ToInt16 Method (DateTime)
Calling this method always throws
InvalidCastException
.
Namespace:
System
Assembly:
mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
Copy
public
static
short
ToInt16
(
DateTime
value
)
Parameters
value
Type:
System
DateTime
The date and time value to convert.
Return Value
Type:
Int16
This conversion is not supported. No value is returned.
Exceptions
Exception
Condition
InvalidCastException
This conversion is not supported.
See Also
Reference
Convert Class
ToInt16 Overload
System Namespace