Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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!");
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity gameobject teleporting 
Csharp :: how to edit postprocessing through script 
Csharp :: how to delete all files in a directory c# 
Csharp :: open url in c# 
Csharp :: c# replace crlf 
Csharp :: convert string array to int c# 
Csharp :: unity get mouse position 
Csharp :: unity exit application 
Csharp :: unity reload scene 
Csharp :: movement script c# 
Csharp :: degree to radians c# 
Csharp :: rigidbody2d freeze position 
Csharp :: c# generate random date 
Csharp :: wann war der dritte weltkrieg 
Csharp :: c# initialize dictionary 
Csharp :: how to flip character in unity 2d 
Csharp :: ping with c# 
Csharp :: open website c# 
Csharp :: c# unzip files 
Csharp :: openfiledialog c# 
Csharp :: move in the direction that player is facing unity 
Csharp :: get random number c# 
Csharp :: c# take first 4 characters of string 
Csharp :: c# map number range 
Csharp :: c# write to console 
Csharp :: how to choose a random child in a gameobject unuity 
Csharp :: dynamics 365 update record c# 
Csharp :: mymove() method c# 
Csharp :: C# how to remove an image in a folder 
Csharp :: c# check valid datetime 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =