Page 22 - CSharp/C#
P. 22
Examples 376
Basic FileWatcher 376
IsFileReady 377
Chapter 59: Func delegates 378
Syntax 378
Parameters 378
Examples 378
Without parameters 378
With multiple variables 379
Lambda & anonymous methods 379
Covariant & Contravariant Type Parameters 380
Chapter 60: Function with multiple return values 381
Remarks 381
Examples 381
"anonymous object" + "dynamic keyword" solution 381
Tuple solution 381
Ref and Out Parameters 382
Chapter 61: Functional Programming 383
Examples 383
Func and Action 383
Immutability 383
Avoid Null References 385
Higher-Order Functions 386
Immutable collections 386
Creating and adding items 386
Creating using the builder 386
Creating from an existing IEnumerable 387
Chapter 62: Garbage Collector in .Net 388
Examples 388
Large Object Heap compaction 388
Weak References 388
Chapter 63: Generating Random Numbers in C# 391

