Reputation: 14285
I have a URL, lets say http://www.example.com
. Sometimes, I need to send HTTP and other times, I need to send HTTPS. For that, I created an enum:
Private _protocol As Protocol
Enum Protocol
HTTP
HTTPS
End Enum
Public Property protocolType() As Protocol
Get
Return _protocol
End Get
Set(ByVal value As Protocol)
_protocol = value
End Set
End Property
Now, when I get the value back from protocoltype, it returns an integer value as enum. How do I get the string name of an enum.
Dim targetUri As String = setting.protocolType & "://www.example.com"
Upvotes: 0
Views: 566