May 2010
Intermediate to advanced
1272 pages
61h 18m
English
As previously mentioned, fields are at class level contrary to local variables that are at the method/property level. There could be situations in which a local variable has the same name of a field. For example, consider the following code in which two items are named counter: a class level field and a local variable:

The code will be correctly compiled; basically no conflict exists between the two counter members because the second one is enclosed within a method and has no external visibility. This also means that the assignment performed within the DoSomething method will not affect the counter private ...
Read now
Unlock full access