Created
November 23, 2010 22:06
-
-
Save vcsjones/712627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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