C# Variable Initialization Question

后端 未结 8 907
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 03:25

Is there any difference on whether I initialize an integer variable like:

int i = 0;
int i;

Does the compiler or CLR treat this as the same

8条回答
  •  抹茶落季
    2020-12-10 04:21

    As the following link states, they are exactly the same:

    http://msdn.microsoft.com/en-us/library/aa664742%28VS.71%29.aspx

提交回复
热议问题