Author: eddy556 | Posted on: 10/30/2009 7:32:13 AM | Views : 1081

Here is my class:


Public Class AppSettings Public Enum AppSettingStr serverURL erroraddress errorcontactno End Enum Public Function GetSettings(ByVal Name As AppSettingStr) As String Return GetSettings([Enum].GetName(GetType(AppSettingStr), Name)) End Function Public Function GetSettings(ByVal Name As String) As String Dim s As String = System.Configuration.ConfigurationManager.AppSettings(Name) If s = "" Then Throw New Exception("Error: App Setting not found: " & Name) Else Return s End If End Function End Class
So how come I can't call these public functions when I type AppSettings.GetSettings()?  The enum shows up and is accessible but the functions aren't


...

Go to the complete details ...