I created a property:
public string fixed { get; set; }
It appears "fixed" has an inbuilt definition. So it doesnt allow me to, says invalid token. But I need to create it with the same name. Is there a way, please help.
I created a property:
public string fixed { get; set; }
It appears "fixed" has an inbuilt definition. So it doesnt allow me to, says invalid token. But I need to create it with the same name. Is there a way, please help.
You can try doing the following:
public string @fixed { get; set; }
As the documentation says, you can use a keyword as a identifier in your code only with @.
Best of luck!
EDIT
If you want property names mapping, (and I assume you serialize them in some way), you can also
[JsonProperty(PropertyName = "fixed")]
public string Fixed { get; set; }
if you use Newtonsoft Json Converter.
(It is also a much cleaner way to handle things)