Guest User

Untitled

a guest
Jun 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ConfigSIP readIn = new ConfigSIP();
  2. readIn.ReadInConfig();
  3. string sip_ip = readIn.sip_ip(); // Get nothing here.
  4.  
  5. public class ConfigSIP
  6. {
  7. private string _sip_ip;
  8.  
  9. // Fill the data table and assign the sip ip.
  10. public void ReadInConfig()
  11. {
  12. DataTable dt = new DataTable("Admin");
  13. dt.ReadXmlSchema(@"C:Config.xml");
  14. dt.ReadXml(@"C:Config.xml");
  15.  
  16. _sip_ip = dt.Rows[0]["Sip_ip"].ToString();
  17. }
  18.  
  19. // Return the sip ip address.
  20. public string sip_ip()
  21. {
  22. return _sip_ip;
  23. }
  24. }
  25.  
  26. ConfigSIP readIn = new ConfigSIP();
  27. readIn.ReadInConfig();
  28. string sip_ip = readIn.sip_ip();
Add Comment
Please, Sign In to add comment