Based on the info I gleaned from the www, the var keyword is a stopgap arrangement. If you don't want to classify a variable as a specific type, you declare it as a var. This type of declaration prevents any blocks and jams and allows you to continue with the coding process. Later, you can either replace var with a specific type or let it be. Your code will still compile perfectly fine because the c# compiler automatically converts all var variables into the correct type.

This means you can declare both actual and derived values as var, at least while writing the code. When you review the code and detect any var instance that affects readability, replace that instance with the actual type. Will this work?




Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan