我是C#的新手,请帮我理解以下语句之间的区别:
var variable_name = new class_a(); // there is no error and is working fine
var variable_name;
variable_name = new class_a(); // this line is throwing error
当我将语句改写为:
时
class_a variable_name;
variable_name = new class_a(); // this is working fine