c# get pc ip address
public static string GetLocalIPAddress()
{
var host = Dns.GetHostEntry(Dns.GetHostName());
foreach (var ip in host.AddressList)
{
if (ip.AddressFamily == AddressFamily.InterNetwork)
{
return ip.ToString();
}
}
throw new Exception("No network adapters with an IPv4 address in the system!");
}
Also in C#:
- C# webclient submit form
- change Backcolor c#
- unity get child
- how to reduce garbage collection c#
- how to deactivate objects through scripts in unity
- if entity.is Transient() Update Mvc 5 c#
- how to use variables in c#
- isGrounded script for copy
- c# string
- c# razor add disabled to button if
- how to populate listbox using list<t> c#
- getcomponent c#
- get random number c#
- c# get value of object in enum
- c# null conditional operator if statement
- c# enum variable set to nonthing
- c# trim string
- c# length of array
- new command - latex
- How can you learn C# on your own
- .net core executenonqueryasync transaction
- C# foreach loop async but wait at end
- csharp check if env is development
- c# fileupload example