VB.NET to C#
Posted on 2006-06-23
I am just trying to move a project from VB.NET to C# (With very little knowledge of C#)
Could anyone pls answer the following questions for me:
1. In my web.config I have:
<add key="NAGTYUtilities.ConnectionString" value="server=xxxxxx; uid=nitinsharma; pwd=$onityGenius1; database=QueryDev"/>
How do I access it in other files to get the connectionstring, at present I am doing like shown below but that gives me error:
SqlConnection sqlconn = new SqlConnection();
sqlconn.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings(1);
2. How Do I write the following VB Line into C# (I get very confused with "" and '')
Any help would b much appreciated.
Ave a gud day!