Link to home
Start Free TrialLog in
Avatar of CRESLISA
CRESLISAFlag for United States of America

asked on

How do you use the GetValue method in Visual Basic .NET???

I get a compiler error from the code below, "Expected ','". At least it looks like a comma. I've used the function from C Sharp by using a similar statement, but I have a project in VB.

Please help!!!

Rant: this kind of thing makes me hate Microsoft. This functionality could be so much easier!!!
Imports System.Configuration 'for settings
 
Dim Settings As AppSettingsReader = New AppSettingsReader()
 
Dim Addresses As String = Settings.GetValue("AlliedQuoteRequestEmailAddress", typeof(System.String))

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jeff Certain
Jeff Certain
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CRESLISA

ASKER

actually, your code still needs to be cast to a string, but that was no problem
Ah... depends if you have option explicit on or not :)