c# - Is there a performance difference between int i =0 and int i = default(int)? -
c# - Is there a performance difference between int i =0 and int i = default(int)? -
i creating integer , wanted instantiate 0 before working with.
i wrote firstly
int = default(int); then removed replace other 1 is
int = 0; i know if selection best in mini mini performance. default() function increment instructions @ compile time?
no, resolved @ compile time , produce same il. value types 0 (or false if have bool, that's still 0) , reference types null.
c# .net c#-4.0
Comments
Post a Comment