Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

.net using appsettings variables

var connectionString = ConfigurationManager.ConnectionStrings["Default"].ConnectionString;
connectionString.Expand() // returns "server=db01.mycompany.com;uid=uid;pwd=pwd;Initial Catalog=master;"
Comment

.net using appsettings variables

<configuration>
    <appSettings>
        <add key="Domain" value="mycompany.com"/>
        <add key="ServerName" value="db01.{Domain}"/>
    </appSettings>
    <connectionStrings>
        <add name="Default" connectionString="server={ServerName};uid=uid;pwd=pwd;Initial Catalog=master;" provider="System.Data.SqlClient" />
    </connectionStrings>
</configuration>
Comment

PREVIOUS NEXT
Code Example
Csharp :: static keyword 
Csharp :: unity fixedupdate 
Csharp :: action delegate c# 
Csharp :: js if empty then 0 
Csharp :: what dotnet command does 
Csharp :: assert.equal 
Csharp :: c# get enum name from value 
Csharp :: Reporting Progress from Async Tasks c# 
Csharp :: error cs1585 unity 
Csharp :: can object change color when collided with particles unity 
Csharp :: DataGridView set column cell Combobox 
Csharp :: atan2 speed unity 
Csharp :: 1180 beecrowd URI 
Csharp :: ef save changes 
Csharp :: deferred rendering unity 
Csharp :: C# multiple button click event to textbox 
Csharp :: clear highlight winforms treeview 
Csharp :: Task timed out after 10.02 seconds 
Csharp :: Set orientation of moving object towards it movement direction without using rigidbody 
Csharp :: get link element revit api 
Csharp :: Include multiple siblings at the Level 
Csharp :: how to detach the camera from the player after death unity 
Csharp :: crystal report error webconfig reference 
Csharp :: cors denied error in asp.net core 
Csharp :: allelrt box wpf 
Csharp :: asp.netcore: develop on win10 run on ubuntu 
Csharp :: how to make a destroy reference in unity 
Csharp :: lambda distinct by property 
Csharp :: tmpro pageCount update 
Csharp :: "; expected" error c#$ 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =