Export (0) Print
Expand All

JsonPrimitive Constructor (String)

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

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

public JsonPrimitive(
	string value
)

Parameters

value
Type: System.String
The String object that initializes the new instance.

ExceptionCondition
ArgumentNullException

value is null.

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

Silverlight

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

ADD
Show:
© 2014 Microsoft