F How to declare connectionStrings in C# App.config file? | CodeTheta

How to declare connectionStrings in C# App.config file?

February 17, 2019

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  
  <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  
  <connectionStrings>
    <add name="connstrng" connectionString="Data Source=.;Initial Catalog=database;Integrated Security=True;"/>
  </connectionStrings>
  
</configuration>

IDE Used To Test This Code : Visual Studio 2012.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment