Files
Newtonsoft.Json/Src/Newtonsoft.Json.Tests/Documentation/Samples/Linq/JValueValue.cs
T
2013-01-28 23:20:05 +13:00

30 lines
655 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
namespace Newtonsoft.Json.Tests.Documentation.Samples.Linq
{
public class JValueValue
{
public void Example()
{
#region Usage
JValue s = new JValue("A string value");
Console.WriteLine(s.Value.GetType().Name);
// String
Console.WriteLine(s.Value);
// A string value
JValue u = new JValue(new Uri("http://www.google.com/"));
Console.WriteLine(u.Value.GetType().Name);
// Uri
Console.WriteLine(u.Value);
// http://www.google.com/
#endregion
}
}
}