C# Use of Unassigned local variable - out statement
c#, out
Solution
You must give default value to the variable:
Image<Gray, Byte> first_image = null;
Otherwise there is a chance you won't assign anything, if you pass `second_image` as the out parameter.
Problem
I've looked for this problem but I don't know (and haven't found) how to solve it. Does anyone here know how to solve the problem? I'm using EMGU, but the issue is with the c# coding (I'm reasonably new to C#) - I think it's to do with the out statement as I haven't used them much: ``` Image<Gray, Byte> first_image; if (start_at_frame_1 == true) { Perform_custom_routine(imput_frame, out first_image); } else { Perform_custom_routine(imput_frame, out second_image); } Comparison(first_image); ```