Hi guys
I'm sure someone can help me, Im trying to just write this very basic app.
One function, user open the .exe and it displays the local IP and host name.
What I have used:
Please click to view the form,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace IPChecker
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "Host Computer: " + Dns.GetHostName();
foreach (IPAddress adress in Dns.GetHostAddresses(Dns.GetHostName()))
{
label2.Text = "IP Adress: " + adress;
}
}
}
}
What did I miss out? Or what do I need for this?
I'm sure someone can help me, Im trying to just write this very basic app.
One function, user open the .exe and it displays the local IP and host name.
What I have used:
Please click to view the form,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace IPChecker
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "Host Computer: " + Dns.GetHostName();
foreach (IPAddress adress in Dns.GetHostAddresses(Dns.GetHostName()))
{
label2.Text = "IP Adress: " + adress;
}
}
}
}
What did I miss out? Or what do I need for this?