2018年3月10日 星期六

Using Application Configuration Files in .NET

請參考來源:Using Application Configuration Files in .NET
---


   
     
                 value="Server=localhost;Database=Northwind;Integrated
                  Security=false;User Id=sa;Password=;" />
   




讀取方式:
// Read appSettings
string title = ConfigurationSettings.AppSettings["ApplicationTitle"];
string connectString =
       ConfigurationSettings.AppSettings["ConnectionString"];

沒有留言:

張貼留言