Need to be aware of when using in loops
If you do not assign an initial value to create an underlying data type that is called by a function call through the OUT keyword, if you are in a loop, the variable will no longer be defined when the initial value is returned.
Case:foreach (Testunit testunit in Ti. Testunitlist){ushort Sv1, Sv2, Dv1, Dv2;Testunit.adjustsampletype = Stepaddsample.adjustaddsampletype ((stepaddsample) step, Testunit.adjustdilutionrat Io, out-sv1, out-dv1, out-Sv2, out Dv2, testunit.isddltdirectlyvolume);}UShort Sv1 is no longer 0 during the loop, so reinitialization is required:foreach (Testunit testunit in Ti. Testunitlist){ushort sv1=0, sv2=0, dv1=0, dv2=0;Testunit.adjustsampletype = Stepaddsample.adjustaddsampletype ((stepaddsample) step, Testunit.adjustdilutionrat Io, out-sv1, out-dv1, out-Sv2, out Dv2, testunit.isddltdirectlyvolume);}
C # keyword out