-
Syntax Help - Convert C# to VB.NET
Hi,
I'm trying to convert the following method to VB.NET
public static string get_setting(string name, string default_value) {
NameValueCollection name_values
= (NameValueCollection)ConfigurationSettings.GetConfig("btnetSettings");
if (name_values[name] == null || name_values[name] == "")
{
return default_value;
}
else
{
return name_values[name];
}
}
After I declare name_values
I'm not sure how to handle this:
name_values = (NameValueCollection)ConfigurationSettings.GetConfig("somekeyinWebConfig");
Any ideas?
Thanks in advance.
-
It's all good, I figured it out:
name_values =CType(ConfigurationSettings.GetConfig("btnetSettings"), NameValueCollection)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks