Avoid having identical member and class names. Although the compiler allows classes and members to be named identically, doing this creates code that is difficult to understand and maintain. For example, the following code contains a subroutine with the same name as the class:
' VB
Class Customer
Sub Customer()
End Sub
End Class
// C#
class Customer
{
class CustomerID
{
static void Customer()
{
}
}
}
Public Class Class1
Sub test()
Dim CustomerID As Integer
End Sub
End Class
Public Module MainMod
Dim CustomerID As Integer
End Module
' VB
' VB
Class CustomerInformation
Sub CreateCustomerID()
End Sub
End Class
// C#
class CustomerInformation
{
class CustomerID
{
static void CreateCustomer()
{
}
}
}