close

必須

using   System.Configuration;

 

         private string GetAppValue(string key)
        {
            string rc = string.Empty;
            try
            {
                rc=ConfigurationSettings.AppSettings.GetValues(key)[0].ToString();
            }
            catch (Exception ex)
            {
                throw;
            }

            return rc;
        }

 

 

例: strText=GetAppValue("date")   ;

app.config內容   
    
   
   
   
   
   
     
   />  
  />

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 11 的頭像
    11

    冠霖的部落格

    11 發表在 痞客邦 留言(0) 人氣()