The answer is no. You cannothave the same identifier for two different
types. With functions and subs though you can overload the identifier as
long as the signatyures are different.
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Terry Olsen" <to******@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
The reason I asked is because I am trying to write a "WinSock" class with
the same properties, methods, and events as the VB6 WinSock Control, which
has the same name for the Close Event & Method.
"Ged Mead" <ge*********@tesco.net> wrote in message
news:Zz**********@newsfe1-gui.ntli.net...
"Terry Olsen" <to******@hotmail.com> wrote in message
news:uD**************@tk2msftngp13.phx.gbl... Can I have an Event & Method with the same name in the same class? I
want
to have a "Close" method to close a socket and a "Close" event to be
raised when the socket is closed.
Even if you could, it's not a good idea. Why chance the unneccessary
confusion when you can use a similar meaningful name instead -
SocketClosed,
CloseSocket, etc?