Page 36 - CSharp/C#
P. 36
Anti-Patterns and gotchas 629
Locking on an stack-allocated / local variable 629
Assuming that locking restricts access to the synchronizing object itself 630
Expecting subclasses to know when to lock 630
Locking on a boxed ValueType variable does not synchronize 632
Using locks unnecessarily when a safer alternative exists 633
Chapter 97: Looping 635
Examples 635
Looping styles 635
break 636
Foreach Loop 637
While loop 638
For Loop 638
Do - While Loop 639
Nested loops 640
continue 640
Chapter 98: Making a variable thread safe 641
Examples 641
Controlling access to a variable in a Parallel.For loop 641
Chapter 99: Methods 642
Examples 642
Declaring a Method 642
Calling a Method 642
Parameters and Arguments 643
Return Types 643
Default Parameters 644
Method overloading 644
Anonymous method 646
Access rights 646
Chapter 100: Microsoft.Exchange.WebServices 648
Examples 648
Retrieve Specified User's Out of Office Settings 648

