Monday, April 13, 2009

To "I" or not to "I"

I read about this in Agile Principles, Patterns, and Practices in C#, the author - Robert Martin says that if you use the "I" prefix for interfaces then you might run into problem if you later decide to change the interface to an abstract class.

In which case you cannot continue to use the "I" prefix name, so you will have to rename it wherever you have referenced it - so, you should not use the prefix.

Microsoft seems to have ignored this issue, they want a interface/class pair to be distinguished but the letter "I" for the interface : http://msdn.microsoft.com/en-us/library/ms229040.aspx

No comments: