Declaring a variable of user-defined type for later initialization
问题 I want to create a global variable called process without assigning anything to it in a first moment. Later on I'll spawn a new process in the operating system, and assign it to that variable. It can be done in C# like so: class TestCS { // creating a variable private System.Diagnostics.Process process; private void SomeMethod() { // assigning a newly spawned process to it process = Process.Start("file.exe", "-argument"); process.WaitForInputIdle(); } } I wrote the code below to accomplish