Use of unassigned out parameter 'parameter' The compiler could not verify that the
out
parameter was assigned a value before it was used; its value may be undefined when assigned. Be sure to assign a value to out parameters in the called method before accessing the value. If you need to use the value of the variable passed in, use aref
parameter instead.
So treat an out
-parameter as unassigned. You are the one who is responsible.
So just remove the if
:
datasetsList = new List<WorkflowVariableDataSet>();
If you want to process a list that is passed to this method use ref
intead (as suggested above):