Reputation: 13
I'm trying to create the following Class:
public decimal base { get; set; }
and I get the error mentioned. Any solution please? Thank you.
I'm trying to create the following Class and I get the error mentioned. Any solution please? Thank you
Upvotes: 0
Views: 126
Reputation: 395
If you want the value to map to it, you need to add the 'JsonProperty' attribute indicating the name of the property.
[JsonProperty("base")]
public decimal Base { get; set; }
Upvotes: 3
Reputation: 834
base
is a special C# keyword.
Anyways, public properties should begin with uppercase letter:
public decimal Base { get; set; }
Upvotes: 0