i am generally declaring fields in a class as a private field together with a public property which accesses this field from outside (nothing spectacular so far smile):
private bool doILookGood; public bool DoILookGood { get { return doILookGood; } set { doILookGood = value; } } Now I was wondering if there's an elegant and efficient way to comment this situation without writing the same comment twice. In other words i want to retain the functionality that the IDE is showing me a variables comment while mouse-hovering with a tooltip.
So far i am commenting in this way:
/// <summary> /// This i always true. /// </summary> private bool doILookGood; /// <summary> /// This i always true. /// </summary> public bool DoILookGood { get { return doILookGood; } set { doILookGood = value; } } and I want to have something like this:
/// <summary> /// This i always true. /// </summary> private bool doILookGood; /// <summary cref="doILookGood" /> public bool DoILookGood { get { return doILookGood; } set { doILookGood = value; } } I know that using XML tags for commenting private fields is not very meaningful because they don't show up in the generated doc but again i only want to have (IDE-internal) comment-tooltips.
Maybe someone has a clue :)
public bool DoILookGood { get; set; }.