JsonPrimitive Constructor (Int16)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Initializes a new instance of a JsonPrimitive type with a Int16 type.
Namespace: System.Json
Assembly: System.Json (in System.Json.dll)
Syntax
'Declaration
Public Sub New ( _
value As Short _
)
public JsonPrimitive(
short value
)
Parameters
- value
Type: System.Int16
The Int16 object that initializes the new instance.
Remarks
A JsonPrimitive object stores a JsonType and the value used to initialize it. When initialized with a Int16 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.
Examples
'Initialize JSON primitive with an Int16.
Dim int16Number As System.UInt16 = 45
Dim jsonP5 As New JsonPrimitive(int16Number)
//Initialize JSON primitive with an Int16.
System.UInt16 int16Number = 45;
JsonPrimitive jsonP5 = new JsonPrimitive(int16Number);
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.