Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetComputerName() [2/4]

static string Interop.Kernel32.GetComputerName ( )
inlinestaticpackage

Definition at line 854 of file Interop.cs.

855 {
856 Span<char> span = stackalloc char[16];
857 uint nSize = (uint)span.Length;
858 if (GetComputerName(ref MemoryMarshal.GetReference(span), ref nSize) == 0)
859 {
860 return null;
861 }
862 return span.Slice(0, (int)nSize).ToString();
863 }
static string GetComputerName()
Definition Interop.cs:275
int Length
Definition Span.cs:70

References Interop.Kernel32.GetComputerName(), System.Span< T >.Length, and System.Span< T >.Slice().