Special Use of the Plus (+) in Powershell

In addition to natural use, i.e. adding two arguments, you can also use the plus sign + in Powershell to make special calls like this one:

 [System.Net.WebRequestMethods+Ftp]::UploadFile 

UploadFile is a public static field according to MSDN , so double colon :: - everything is clear so far. But why is the Ftp class so special that instead of a dot . does he need + ? I could not find the documentation for this part (official or not).

Are there any other uses for + other than WebRequestMethods+Ftp ?

+8
powershell
source share
1 answer

The WebRequestMethods class is a container; it contains an FTP class. FTP itself is a nested class, and you must use + notation to access the nested class in PowerShell (or C #, for that matter). More details here .

+10
source share

All Articles