i am using windows application with c#.net i want get the system ip address and store the database This is My code

using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
.
.
.

string[] computer_name =System.Net.Dns.GetHostEntry(Process.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });

            txt_ipaddress.Text = strClientIP.ToString() + "[" + computer_name[0].ToString() + "]"; 

Come to My problem i got the error in 'System.Diagnostics.Process' does not contain a definition for 'ServerVariables' How to slove This ...

Which system's IP address do you want?
1) The current one?
2) Some remote one?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.