在.NET中初始化null变量的正确方法是什么?我的一位同事告诉我,将变量硬定义为null是一种放缓.
int var1; // good practice string s1; // good practice int var2 = 0; // bad practice string s2 = null; // bad practice
那是对的吗?
.net c# variables initialization
.net ×1
c# ×1
initialization ×1
variables ×1