The point isn't that int has an inherent invariant that's being preserved by initialization; the point is that your code's interpretation of that int has invariants. Are you using the int to represent a counter? Initialize to 0. Are you using the int to represent a multiplicative accumulator? Initialize to 1. Are you using the int to represent the answer to life, the universe, and everything? Initialize to 42.
I agree with you.
For those who doesn't agree; It's just about choosing logical numbers when you initilize. For example, if I have a timer that counts down from 60 seconds, wouldn't the most logical initialization number be 60 then?
When we are talking about initialization, I just have to put in a small question. When programming in C# XNA, how would you initialize your variables?
1. When you declare them
2. In the constructor
3. In the Initialize method
All three ways works. So far I've always initilized in the constructor as some classes recives parameters. Which one is the "more" correct?