I'm working on an old vb6 application (long story, .NET Framework is not available).
I want to know, can I declare a vb6 Class Property item as an Enum?
e.g.
Public Enum WinInetPort
INTERNET_INVALID_PORT_NUMBER = 0
INTERNET_DEFAULT_FTP_PORT = 21
INTERNET_DEFAULT_GOPHER_PORT = 70
INTERNET_DEFAULT_HTTP_PORT = 80
INTERNET_DEFAULT_HTTPS_PORT = 443
INTERNET_DEFAULT_SOCKS_PORT = 1080
End Enum
Class Module:
Private m_Port As WinInetPort
Public Property Get Port() As WinInetPort
Port = m_Port
End Property
Public Property Let Port(val As WinInetPort)
m_Port = val
End Property
But, I get errors when compiling
Only comments may appear after End Sub, End Function, or End Property
The error is highlighted on the next Private statement in the class.
I've read somewhere on the net vb6 classes can't expose Public Constants - is there a workaround?
Thanks