Quote Originally Posted by Longbottomup View Post
Look at C++: in Breadth_first_search(queue<int> &Q, vector<int> &trace, bool grid[][maxx], int start, int nodes) and Trace_result(vector<int> &trace, int start, int end, int nodes)
I see: &Q and &trace is passing value???? So i code in C#:ref queue<int> Q and ref List<int> trace.
So, after, whatever i edit, it seem error in: trace[start] = 1
No - you don't need the 'ref' unless you are changing the root object and want that passed back - changing an element of a list does not require 'ref'.