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;
More Related Contents:
- In C#, should I use string.Empty or String.Empty or “” to intitialize a string?
- Initializing C# auto-properties [duplicate]
- How to initialize a List to a given size (as opposed to capacity)?
- How to initialize var?
- Very Simple definition of InitializeComponent(); Method
- Understanding C# field initialization requirements
- DateTime “null” / uninitialized value?
- Unable to cast object of type ‘System.Int32’ to type ‘System.String’ error
- Displaying the build date
- Create folder and file on Current user profile, from Admin Profile
- Get dictionary key by value
- What does $ mean before a string?
- Test if a property is available on a dynamic variable
- C# use System.Type as Generic parameter
- EntityType has no key defined error
- How to find the extension of a file in C#?
- When should I use Html.Displayfor in MVC
- WiX silent install unable to launch built in .EXE: WiX v3
- Merge multiple Lists into one List with LINQ
- JObject.Parse vs JsonConvert.DeserializeObject
- Proper Currying in C#
- How do I embed my own fonts in a WinForms app?
- Define a generic that implements the + operator [duplicate]
- Is it possible to update an existing Windows Phone 8 app to Windows Phone Store 8.1
- How to debug into my nuget package deployed from TeamCity?
- Using IEnumerable without foreach loop
- Executing tasks in parallel
- Entity Framework Code First AddOrUpdate method insert Duplicate values
- Full postback triggered by LinkButton inside GridView inside UpdatePanel
- Can I ‘invert’ a bool?