JsonPrimitive Constructor (UInt16)


Initializes a new instance of a JsonPrimitive type with a UInt16 type.

This API is not CLS-compliant. 

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

public JsonPrimitive(
	ushort value


Type: System.UInt16
The UInt16 object that initializes the new instance.

A JsonPrimitive object stores a JsonType and the value used to initialize it. When initialized with a UInt16 object, the JsonType is a Number, which can be recovered using the JsonType property. The value used to initialize the JsonPrimitive object can be recovered using the ToString() method.

//Initialize JSON primitive with a UInt16.
System.UInt16 uInt16Number = 44;
JsonPrimitive jsonP4 = new JsonPrimitive(uInt16Number);


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions