As far as I know[*], C# defaults the plain-old-data-types (int
, float
, bool
, etc) to sensible values. int a
, float b
, and bool c
take on the values 0
, 0.0f
, and false
, respectively.
Assuming this is so:
Should I explicitly give my variables values of 0
, 0.0f
, and false
for clarity, or should I leave the values implicit, thus reducing the amount of code I write, (arguably) reducing the number of errors I can introduce into the program?
[*] To be honest, after 10 minutes of googling, I'm struggling to find the relevant documentation that confirms this! If anyone points it out to me I'll amend the question!