I'm not sure why I'm getting this error, but shouldn't this code compile, since I'm already checking to see if queue is getting initialized?
So if queue is not initialized, then the for loops aren't reachable right? Since the program already terminates with Environment.Exit(0)?Hope ya'll can give me some point C# error: Use of unassigned local variable The compiler doesn't know that the Environment.Exit() is going to terminate the program; it just sees you executing a static method on a class. Just initialize queue to null when you declare it.Queue queue = null; |
Comments
Post a Comment