This line of code works, but I'm not sure why it does.
[JsonProperty("id", Required = Required.Always)]
To me this seems to be setting a value of a
Property in the
JsonProperty class. Is this unique only to
Attributes and declaring attributes?
Looking at the
JsonProperty class I can see that the constructor is written like so
public JsonPropertyAttribute(string propertyName);
Again, how does this work? It seems to run contrary to how I've written C# for the past year.. Is it magic within the
Attribute class or is it actually a feature of C#?