Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tricky C# syntax for out function parameter

I'm familiar with using out to pass in a simple data type for manipulation, but I can't seem to figure out how to pass in this Queue<> without causing a compile error. Any ideas?

Code:

Queue<SqlCommand> insertScriptQueue = new Queue<SqlCommand>();

private void UpdateDefaultIndicator(int newDefaultViewID,
                                    out (Queue<SqlCommand>) insertScriptQueue)

UpdateDefaultIndicator(newViewID, out (Queue<SqlCommand>)insertScriptQueue);
like image 212
Will Avatar asked Dec 04 '22 14:12

Will


1 Answers

You're passing in a reference type. No need to use out.

like image 73
gn22 Avatar answered Dec 23 '22 04:12

gn22