1] A field can be made read-onlyConsider the following example, Admin_Settings class has a private object ObjDB (an object of class Database)
2] Use 'var' keyword when initializer explicitly declares typeThe var keyword is fairly contentious in terms of usage, but if there’s one instance where its use is sensible, it’s in initializations alike to the following:
3] Use declaration closer to usage
Consider the following example, where many variables are declared which are not really closer to usage. The Database object DsPaidAmount is declared at the top, and used at the very bottom (so, declaration and usage are not closer).
Further, for better memory management we can use the “using” constructor, and also remove the type on the left-hand side and replace it with var as follows: