www.ctrt.net > winForm議App.ConFig,奕担距喘万戦中議 銭俊忖憲堪?

winForm議App.ConFig,奕担距喘万戦中議 銭俊忖憲堪?

//using System.Configuration;廣吭枠耶紗凪dll哈喘 private void button1_Click(object sender, EventArgs e) { string strConn = ConfigurationManager.ConnectionStrings[0].ConnectionString; MessageBox.Show(strConn); }

app.config頁匯倖xml鯉塀議諒籾低匆頁嬉蝕万耶紗低勣議販採旗鷹曳泌 sql全俊忖憲堪 壓旗鷹戦辛參喘xmldocument肇函低勣議峙

1.枠壓殻會嶄擬秘淫using System.Configuration; 2.賜頁壓嘔円酊臣嶄耶紗翌囚哈喘 System.Configuraton; xml猟周塘崔泌和

壓殻會塰佩扮喘薩俐個阻蝶倖塘崔朔羨軸哘喘欺殻會。箭泌壓app.config嗤匯倖塘崔遑喘栖協崙哘喘殻會完笥炎籾泌和侭幣 邪譜低葎喘薩戻工阻俐個殻會炎籾議順中輝喘薩俐個阻殻會炎籾曳泌俐個葎^伴賑態字垓殻酌陣狼由 ̄ 1遍枠羨軸斑...

app.config辛參宥狛耶紗酊進象坿議圭塀徭強耶紗輝塘崔挫酊進象坿岻朔氏徭強伏撹贋慧嗤銭俊忖憲堪議app.config猟周。 匆辛參返強耶紗園亟app.config猟周醤悶化帶頁嘔囚汽似垢殻兆->耶紗->仟秀->哘喘殻會塘崔猟周宸戦喘潮範議App.co...

嘔囚泣似低議酊--Add--New Item--僉夲Application Configuration File萩隠隔潮範兆各倦夸低議殻會響函App.config扮誼欺議峙頁腎議。 嬉蝕App.config耶紗哘喘殻會譜崔議5倖囚峙 first_run: 哘喘殻會及匯肝屎械尼強 server: 捲暦匂IP data...

亟匯倖塘崔猟周慧壓匯倖巷喘朕村和耽倖酊甚探鎚浦鯣ゞ組〈始堕埜塘崔猟周

壓蝕窟Web酊慎鎚浦鬘氏嗤匯倖塘崔猟周Web.config喘栖贋慧匯乂畠蕉 議延楚泌銭俊方象垂喘議忖憲堪。獏Φ庁壓蝕窟winform殻會扮匆嗤匯倖塘崔猟周万祥頁App.config宸倖猟周議恬喘嚥 Web.config寄崑猴匆辛參喘栖贋慧殻會侭喘議畠...

Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); 軸頁app.config 侭壓議猟周斜, Console.WriteLine(Application.ExecutablePath+".config"); 頁app.config 猟周議蒸斤揃抄,匆祥頁頼屁揃抄

DataDirectory頁響函App_Data和議猟周。 恷挫頁宸劔^~ ̄頁響函哘喘捲暦朕村議功朕村。 Data Source=~/jz_manage.mdb" providerName="System.Data.OleDb" />

利嫋仇夕

All rights reserved Powered by www.ctrt.net

copyright ©right 2010-2021。
www.ctrt.net坪否栖徭利大泌嗤盃係萩選狼人捲。zhit325@qq.com