I'm disapppointed. I would've thought that a self-appointed genius would be able to figure this out in his sleep!
I can think of two possible solutions here. One is to create your enum:
Private Enum ProviderTypes
And when you want to use it as a string value all you have to do is invoke ToString on it:
Dim sTest As String
sTest = ProviderTypes.MicrosoftJetOLEDB40.ToString()
The problem with this approach is that if you actually wanted to use the Enum values as part of a connection string or something they wouldn't be entirely correct, since you have to drop the punction out of ones like "Microsoft.Jet.OLEDB.4.0" because you simply can't have periods in variable/object names.
If you wanted to have the nice intellisense popup provided by using an enum as a property - and you wanted the true values of the enum constants, you could add in a little function that did some converting for you, for ex:
Private Function GetProviderTypeAsString(eProviderType As ProviderTypes) As String
Select Case eProviderType
Case Else ' Return ToString version of provider types that don't need converting.
The function above would return a more useful string for use with connection strings or whatever.
Simple usage (and a great way to verify/test that it works):
' This displays "Microsoft.Jet.OLEDB.4.0"
' This displays "SQLOLEDB"
You'd show the property to the consumer of your class as the enum - for easy setting and displaying with intellisense. When it came time to actually do something with that property, like use it in a connection string, you'd use the conversion function to get the proper value for it.