Reputation: 41
I am writing a code which shares information between the windows and android devices. I need to share the name of the devices also. I used String model = Build.MODEL; for getting the name of the android device in android code. But I am not sure what should I use to know the name of windows device in C# code. I tried googleing but did not help. Can someone help me in this..
Upvotes: 3
Views: 8401
Reputation: 1610
As Nicholas V. stated, you can use:
string pcName = System.Environment.MachineName;
to return a string containing the NetBIOS name of the local machine.
Upvotes: 11