System.Environment.MachineName
It works unless a machine name has more than 15 characters.
More Related Contents:
- Get IPv4 addresses from Dns.GetHostEntry()
- How to get mx records for a dns name with System.Net.DNS? [closed]
- How to get full host name + port number in Application_Start of Global.aspx?
- Top level domain from URL in C#
- Getting the IP address of server in ASP.NET?
- How do I clear System.Net client DNS cache?
- C# Active Directory: Get domain name of user?
- Dns.BeginGetHost… methods blocking
- Reverse IP Domain Check?
- how to write every element of an array in a line of a textbox C# [closed]
- How to use localization in C#
- Why .NET String is immutable? [duplicate]
- Cannot deserialize the current JSON object (e.g. {“name”:”value”}) into type ‘System.Collections.Generic.List`1
- What is the best way to clone/deep copy a .NET generic Dictionary?
- Read SQL Table into C# DataTable
- Generic constraints, where T : struct and where T : class
- JSON.NET Parser *seems* to be double serializing my objects
- WebBrowser.DrawToBitmap() or other methods?
- How to save PictureBox.Image to file?
- How to write a ViewModelBase in MVVM
- How can I get generic Type from a string representation?
- When to use enums, and when to replace them with a class with static members?
- Determine Operating System in .NET Core
- What is the worst gotcha in C# or .NET? [closed]
- In a switch vs dictionary for a value of Func, which is faster and why?
- The entity type ‘IdentityUserLogin’ requires a primary key to be defined [duplicate]
- The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations
- How to use dependency injection in WinForms
- Why can’t we define a variable inside a while loop?
- C# – Get mac address in Universal Apps