See the following code listing. Run it with the ToString() method commented and add a instance of the clsExample class nin watch window and notice the data. Compare it with the original verison.
using System.Diagnostics;
namespace DebuggererAttribute
{
public class clsExample
{
private int _FieldOne;
private double _FieldTwo;
private string _FieldThree;
private bool _FieldFour;
public int FieldOne
{
get
{
return _FieldOne;
}
set
{
_FieldOne = value;
}
}
public double FieldTwo
{
get
{
return _FieldTwo;
}
set
{
_FieldTwo = value;
}
}
public string FieldThree
{
get
{
return _FieldThree;
}
set
{
_FieldThree = value;
}
}
public bool FieldFour
{
get
{
return _FieldFour;
}
set
{
_FieldFour = value;
}
}
public override string ToString()
{
return string.Format("FieldOne = {0}, FieldTwo = {1}, FieldThree = {2}, FieldFour = {3}", _FieldOne, _FieldTwo, _FieldThree, _FieldFour);
}
public clsExample()
{
_FieldOne = 2;
_FieldTwo = 3.66;
_FieldThree = "This is some text";
_FieldFour = true;
}
}
}