This is an auto property, not an anonymous property. In fact, there is a private support field for it, it is simply generated automatically by the compiler and is not available to you at compile time. If you run your class using Reflector (or view it at run time with reflection), you will see a support box.
To answer your question, โWhat's the difference?โ, The obvious answer is that one is a field, while one is a property. The advantage of using auto properties is that it gives you the opportunity to switch to traditional properties later, if the need arises, without changing your API. Since third-party code is capable of โreachingโ one and not the other, this will be the question that the other developer will best answer. However, most APIs are designed to work with properties, not with fields (since the common wisdom is that you do not open fields outside the declaring class). If a third-party library smoothly scans your class, it is most likely looking for properties.
It is important to remember that:
private string backingField; public string Data { get { return backingField; } set { backingField = value; } }
and
public string Data { get; set; }
Essentially the same code compiled. The only significant difference is the name of the support field.
source share