Today I was reminded that C# is a bit more strict in its naming conventions than VB.NET. After I converted an old project from VB.NET to C#, I spent a good part of the afternoon updating the names of properties that had been called the same as the class, which is obviously not allowed in C#. However, do we really need properties with the same name as the class? Maybe that’s a code smell?
Suggestion: Instead of making classes like this:
Public Class PhoneNumber Public String Prefix Public String PhoneNumber End Class
Make them like this:
Public Class PhoneNumber Public String Prefix Public String Number End Class
Then you can convert them to C# using any old tool for this (e.g. SharpDevelop), without having to haunt your source code looking for references to the now no-longer-valid property