My question relates to a line of PowerShell code that I have come across in a script that automates FTP uploads.
The line in question is:
$request.Method = [System.Net.WebRequestMethods+Ftp]::UploadFile
Instead, I thought that it might have been as follows (but this doesn't work):
$request.Method = [System.Net.WebRequestMethods.Ftp]::UploadFile
Really, I would like someone to explain to me why using the '+' sign instead of '.' means the difference between the overall script working or not.
Thanks so much in advance.