填充App.xaml问题 [英] Populate in App.xaml problem
本文介绍了填充App.xaml问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在WPF C#中的App.xaml文件中编写以下代码,请帮帮我
how to write the below code in App.xaml file in WPF C#,please help me
public static string ip =ConfigurationManager.AppSettings["IP"];
public static int port = Convert.ToInt32(((object)ConfigurationManager.AppSettings["PORT"]).ToString());
public static int timeout = Convert.ToInt32(((object)ConfigurationManager.AppSettings["Time"]).ToString());
推荐答案
<appSettings>
<add key="IP" value="127.0.0.1"/>
<add key="PORT" value="522"/>
<add key="Time" value="0"/>
</appSettings>
这篇关于填充App.xaml问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文