Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to write the below code in App.xaml file in WPF C#,please help me

C#
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());
Posted
Comments
Naz_Firdouse 30-May-14 8:16am    
you mean to say you want to assign values in xaml???
Member 10830802 30-May-14 8:32am    
yes,how to create in app.xaml?

RDBurmon 30-May-14 10:00am    
Can you share App.xaml file ?
RDBurmon 30-May-14 10:23am    
Or share content which are there in app.xaml

1 solution

XML
<appSettings>
    <add key="IP" value="127.0.0.1"/>
    <add key="PORT" value="522"/>
    <add key="Time" value="0"/>
</appSettings>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900