Skip to content

Commit 699d4ff

Browse files
committed
.dotnet.hostname: get network name like other backends [skip ci]
1 parent 6122442 commit 699d4ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

+stdlib/+dotnet/hostname.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
%% DOTNET.GET_HOSTNAME get the computer network hostname
2-
% not necessary FQDN
32

43
function n = hostname()
54

6-
n = char(System.Environment.MachineName);
5+
%n = char(System.Environment.MachineName);
76
% https://learn.microsoft.com/en-us/dotnet/api/system.environment.machinename
87

8+
n = char(System.Net.Dns.GetHostName());
9+
% https://learn.microsoft.com/en-us/dotnet/api/system.net.dns.gethostname
10+
911
end

0 commit comments

Comments
 (0)