This is an add-in for Fody
Generates ToString method from public properties for class decorated with a [ToString]
Attribute.
Nuget package http://nuget.org/packages/ToString.Fody/
To Install from the Nuget Package Manager Console
PM> Install-Package ToString.Fody
[ToString]
class TestClass
{
public int Foo { get; set; }
public double Bar { get; set; }
[IgnoreDuringToString]
public string Baz { get; set; }
}
class TestClass
{
public int Foo { get; set; }
public double Bar { get; set; }
public string Baz { get; set; }
public override string ToString()
{
return string.Format(
CultureInfo.InvariantCulture,
"{{T: TestClass, Foo: {0}, Bar: {1}}}",
this.Foo,
this.Bar);
}
}
Icon courtesy of The Noun Project