Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net If with declaration

I ant to declare a variable in the following code used with an API but
I get an error showing that the variable is hidden in an encclosong blocck


If Hosting.HostingEnvironment.IsDevelopmentEnvironment Then
                Dim myxeroconsumer As New Consumer("xxx", "yyyy")
            Else
                Dim myxeroconsumer As New Consumer("gggg", "jjjjj")
            End If
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India 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
SOLUTION
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 Murray Brown

ASKER

thanks very much