Skip to content

Instantly share code, notes, and snippets.

@vcsjones
Created November 23, 2010 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vcsjones/712627 to your computer and use it in GitHub Desktop.
Save vcsjones/712627 to your computer and use it in GitHub Desktop.
// Written for .NET 3.5.
[DataContract]
public class JSONObject
{
/// <summary>
/// This is how you can escape a keyword as an identifier.
/// </summary>
[DataMember]
public string @public
{
get; set;
}
/// <summary>
/// If you don't want to escape it and declare it instead.
/// </summary>
[DataMember(Name = "public")]
public string Public
{
get; set;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment