T
T
TomosBlack2015-05-29 23:11:22
PowerShell
TomosBlack, 2015-05-29 23:11:22

How does the $null overload work?

It's happening in PowerShell
I can understand why
([system.Net.Dns]::GetHostByName()) doesn't work.AddressList
No overload, ok.
But why does it work, also with the result (gives the local ip)
([system.Net.Dns]::GetHostByName($null)).AddressList

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ruchkin, 2015-05-30
@TomosBlack

https://msdn.microsoft.com/en-us/library/system.ne... (v=vs.110).aspx
If you pass an empty string as the host name, this method retrieves the standard host name for the local computer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question