I'm defining my first custom class in powershell 5.1. I'm creating methods for my class. MS Learn tells me I must have a return type in the method definition but it constantly generates an error in the IDE
# Define a class
class MyError
{
[string] $date
[ErrorRecord] $PSErrorObject...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.