When defining properties I like to do just before property declaration, something like this
private IList<SomeType> _myList;
public IEnumerable<SomeType> MyList
{
get { return _myList;}
}
But if I place ///<summary> tag on the property, I lose the benefit of declaring the backing fields like this, it is not readable any more. If I place it before backing field, comments do not show in the IDE. Is there a way to put summary tag before backing field and have it show up in IDE (VS2008)?
The
/// <summary>tag has to be placed just before the element it is describing.You can try and put the field just after the property:
If the backing field is not essential (only used the same way as your example), you can simply use automatic properties: