transfer the data into the new scope using parameters.
A method can have one or more parameters. Within the scope of the method
these parameters are treated like local variables, initialized with the value from
the parameter in the method-call.
1: private void methodWithParameters(str _parm1, int _parm2
2: = 1)
3: {
4: } All parameters are passed by value, this means you cannot change the value ofthe original variable, but only the local variable in the method, which is a copy of
the original.
In the previous example, the second parameter is assigned a default value. This
means that when the method is called, the second parameter is optional. If it is
called without a second parameter, _parm2 will be set to 1.
Best Regards,
Hossein Karimi

Like
Report
*This post is locked for comments