// These two statements are functionally the same.
driverName = name;
this.driverName = name;
}
...
}
Even though there is little to be gained when using this in unambiguous situations, you may
still find this keyword useful when implementing members, as IDEs such as SharpDevelop and
Visual Studio 2008 will enable IntelliSense when this is specified. This can be very helpful when
you have forgotten the name of a class member and want to quickly recall the definition. Consider
Figure 5-3.
Figure 5-3.
The IntelliSense of this
C H A P T E R 5
■
D E F I N I N G E N C A P S U L AT E D C L A S S T Y P E S
148
8849CH05.qxd 10/22/07 1:34 PM Page 148
Do'stlaringiz bilan baham: |