Parameter.ToUInt16 Method
Applies To: Windows 8.1
Retrieve the value of the parameter as a specific data type.
Namespace: Microsoft.Assessments.Runtime
Assembly: Microsoft.Assessments.Core (in Microsoft.Assessments.Core.dll)
Usage
'Usage
Dim instance As Parameter
Dim returnValue As UShort
returnValue = instance.ToUInt16
Syntax
'Declaration
Public Function ToUInt16 As UShort
public ushort ToUInt16 ()
public:
unsigned short ToUInt16 ()
public UInt16 ToUInt16 ()
public function ToUInt16 () : ushort
Return Value
Returns UInt16.
Remarks
This method returns a type safe value of a parameter. The method checks the underlying data type of the parameter and if the type is not the same as the one requested, or if there is not a mapping, the method returns an error that the conversion failed.
If this returns any error, all the bits of the output value are set to zero or to the empty string, and the value of paramValue is set to false. A non-zero value has a Boolean value of true and a value of zero has a Boolean value of false.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows 8.1
See Also
Reference
Parameter Class
Parameter Members
Microsoft.Assessments.Runtime Namespace