Hi I have C# code that is similar to this:
int someNumber;
Thing someThing;
doStuff(out someNumber);
someThing = new Thing(someNumber);
What I would like to know is if there is any way to remove the someNumber and instantiate someThing directly within the parameter arguments.
Edit the actaul code gives me back 8 out parameters but I was just trying to keep it simple so it is more like:
int someNumber1, someNumber2, somNumber3, someNumber4,
someNumber5, someNumber6, someNumber7, someNumber8;
Thing someThing1, someThing2, someThing3, someThing4,
someThing5, someThing6, someThing7, someThing8;
doStuff(out someNumber1, out someNumber2, out someNumber3, out someNumber4,
out someNumber5, out someNumber6, out someNumber7, out someNumber8);
someThing1 = new Thing(someNumber1); etc.....................