Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

JsonPrimitive Constructor (Decimal)

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

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)
public JsonPrimitive(
	decimal value
)

Parameters

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

A JsonPrimitive object stores a JsonType and the value used to initialize it. When initialized with a Decimal 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 decimal.
decimal dNumber = new Decimal(42);
JsonPrimitive jsonP1 = new JsonPrimitive(dNumber);


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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.