Wednesday, January 20, 2010

Wow this one takes the cake.

So of late I have been working on a older system created in .NET by a delphi programmer. It has some very interesting behaviors.

private string Xml { set { this.Address = value; } }

public FooClass(PaymentInfo info)
: base(info)
{
this.Xml = string.Format("Some random string goes here" . .

The problems with this are many. The least of which would be the fact they created a property Xml that just sets another property Address. Why would you do this. You can just call Address.