Page 18 - CSharp/C#
P. 18
Enum as flags 303
Test flags-style enum values with bitwise logic 305
Enum to string and back 305
Default value for enum == ZERO 306
Enum basics 307
Bitwise Manipulation using enums 308
Using << notation for flags 308
Adding additional description information to an enum value 309
Add and remove values from flagged enum 310
Enums can have unexpected values 310
Chapter 51: Equality Operator 312
Examples 312
Equality kinds in c# and equality operator 312
Chapter 52: Equals and GetHashCode 313
Remarks 313
Examples 313
Default Equals behavior. 313
Writing a good GetHashCode override 314
Override Equals and GetHashCode on custom types 315
Equals and GetHashCode in IEqualityComparator 316
Chapter 53: Events 318
Introduction 318
Parameters 318
Remarks 318
Examples 319
Declaring and Raising Events 319
Declaring an Event 319
Raising the Event 319
Standard Event Declaration 320
Anonymous Event Handler Declaration 321
Non-Standard Event Declaration 322
Creating custom EventArgs containing additional data 322

