Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ConfigSIP readIn = new ConfigSIP();
- readIn.ReadInConfig();
- string sip_ip = readIn.sip_ip(); // Get nothing here.
- public class ConfigSIP
- {
- private string _sip_ip;
- // Fill the data table and assign the sip ip.
- public void ReadInConfig()
- {
- DataTable dt = new DataTable("Admin");
- dt.ReadXmlSchema(@"C:Config.xml");
- dt.ReadXml(@"C:Config.xml");
- _sip_ip = dt.Rows[0]["Sip_ip"].ToString();
- }
- // Return the sip ip address.
- public string sip_ip()
- {
- return _sip_ip;
- }
- }
- ConfigSIP readIn = new ConfigSIP();
- readIn.ReadInConfig();
- string sip_ip = readIn.sip_ip();
Add Comment
Please, Sign In to add comment