[Mono-dev] more Gendarme rules

Vladimir Giszpenc vladimir.giszpenc at gmail.com
Fri Jun 8 14:04:04 EDT 2007


Hi,

In programming spelling counts and case usually matters as well.  A
perfect example is in properties.


//Microsoft says we should no longer use m_ or hungarian notation
//note the lower case first letter
private Type propertyName;


public Type PropertyName
{
   get
   {
      return this.PropertyName;  //this will crash your app
   }
   set
   {
      return this.PropertyName = value;  //this will crash your app
   }
}

This is fairly easy to find, but should also be easy find by some code
analyzer.  Gendarme rule or compiler warning...  Either way, I await
the next MonoDevelop with baited breath.

Thanks,

Vlad



More information about the Mono-devel-list mailing list