views:

72

answers:

2

The C# code is:

DataContext db = new DataContext(MyProject.Properties.Settings.Default.MyString)

I am trying to convert this app to VB.NET but VB.NET does not seem to have a .Properties on the project. I am probably confused about what that C# is actually doing. I assumed it was trying to get the string out of the app.config (both versions have the same app.config) or out of Settings.settings in the Properties folder.

Visual Basic does not have a properties folder though, only a My Project folder.

Any ideas? I am using Visual Studio 2010.

+2  A: 

You can try My.Settings , that is what I seem to be using in VB.Net currently.

sworoc
+2  A: 

You are almost there. When you add a new setting, you can get access to it my going to My.MySettings.Default.MyString in Visual Basic.

Nick
Have my babies!
SLC