Guest User

Untitled

a guest
Jul 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public class ValueInteger
  2. {
  3. [JsonIgnore]
  4. public string ValueName { get; set; }
  5.  
  6. public int Value { get; set; }
  7.  
  8. [JsonProperty("timestamp")]
  9. public UInt64 TimeStamp { get; set; }
  10.  
  11. }
  12.  
  13. var valueInt = new ValueInteger
  14. {
  15. ValueName = "mycounter",
  16. Value = 7,
  17. TimeStamp = 1010101010
  18. }
  19.  
  20. { mycounter: 7, timestamp = 1010101010 }
  21.  
  22. [JsonRedirect(titlePropertyName: nameof(ValueName))]
  23. public int Value { get; set; }
Add Comment
Please, Sign In to add comment