You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -968,15 +970,15 @@ The behavior of the garbage collector can be controlled, to some degree, via sta
968
970
>createsaninstanceof class `A` and an instance of class `B`. These objects become eligible for garbage collection when the variable `b` is assigned the value `null`, since after this time it is impossible for any user-written code to access them. The output could be either
969
971
>
970
972
> ```console
971
-
> Finalize instance of `A`
972
-
> Finalize instance of `B`
973
+
> Finalize instance of A
974
+
> Finalize instance of B
973
975
> ```
974
976
>
975
977
> or
976
978
>
977
979
> ```console
978
-
> Finalize instance of `B`
979
-
> Finalize instance of `A`
980
+
> Finalize instance of B
981
+
> Finalize instance of A
980
982
> ```
981
983
>
982
984
> because the language imposes no constraints on the order in which objects are garbage collected.
>*Example*:Referringtotheexampleabove, if `A` and `B` weredeclaredinseparateprograms, itwouldbepossiblefor `A.X` to depend on `B.Z`, but `B.Z` could then not simultaneously depend on `A.Y`.
1434
-
>
1435
-
> *end example*
1440
+
>*Example*:Referringtotheexampleabove, if `A` and `B` weredeclaredinseparateprograms, itwouldbepossiblefor `A.X` to depend on `B.Z`, but `B.Z` could then not simultaneously depend on `A.Y`. *end example*
1436
1441
1437
1442
## 14.5 Fields
1438
1443
@@ -1622,7 +1627,8 @@ These restrictions ensure that all threads will observe volatile writes performe
1622
1627
>// Run Thread2() in a new thread
1623
1628
>newThread(newThreadStart(Thread2)).Start();
1624
1629
>
1625
-
>// Wait for Thread2() to signal that it has a result by setting finished to true.
1630
+
>// Wait for Thread2() to signal that it has a result
@@ -2505,16 +2515,16 @@ A compile-time error occurs unless all of the following are true for an override
2505
2515
>
2506
2516
>classD : C<string>
2507
2517
> {
2508
-
> publicoverridestringF() {...} // Ok
2509
-
> publicoverrideC<string> G() {...} // Ok
2510
-
> publicoverridevoidH(C<T> x) {...} // Error, should be C<string>
2518
+
> publicoverridestringF() {...} // Ok
2519
+
> publicoverrideC<string> G() {...} // Ok
2520
+
> publicoverridevoidH(C<T> x) {...} // Error, should be C<string>
2511
2521
> }
2512
2522
>
2513
2523
>classE<T,U> : C<U>
2514
2524
> {
2515
-
> publicoverrideUF() {...} // Ok
2516
-
> publicoverrideC<U> G() {...} // Ok
2517
-
> publicoverridevoidH(C<T> x) {...} // Error, should be C<U>
2525
+
> publicoverrideUF() {...} // Ok
2526
+
> publicoverrideC<U> G() {...} // Ok
2527
+
> publicoverridevoidH(C<T> x) {...} // Error, should be C<U>
2518
2528
> }
2519
2529
> ```
2520
2530
>
@@ -2977,7 +2987,7 @@ When the effective return type of a method is not `void` and the method has an e
2977
2987
> }
2978
2988
> ```
2979
2989
>
2980
-
>thevalue-returning `F` methodresultsinacompile-timeerrorbecausecontrolcanflowofftheendofthemethodbody. The `G` and `H` methodsarecorrectbecauseallpossibleexecutionpathsendinareturnstatementthatspecifiesareturnvalue. The `I` methodiscorrect, becauseitsbodyisequivalenttoastatementblockwithjustasinglereturnstatementinit.
2990
+
>thevalue-returning `F` methodresultsinacompile-timeerrorbecausecontrolcanflowofftheendofthemethodbody. The `G` and `H` methodsarecorrectbecauseallpossibleexecutionpathsendinareturnstatementthatspecifiesareturnvalue. The `I` methodiscorrect, becauseitsbodyisequivalenttoablockwithjustasinglereturnstatementinit.
2981
2991
>
2982
2992
> *endexample*
2983
2993
@@ -3611,7 +3621,8 @@ Events are declared using *event_declaration*s:
>*Example*:Givenan*enum_type* `E` withandunderlyingtypeof `int`, aconversionfrom `E` to `byte` isprocessedasanexplicitnumericconversion ([§10.3.2](conversions.md#1032-explicit-numeric-conversions)) from `int` to `byte`, andaconversionfrom `byte` to `E` isprocessedasanimplicitnumericconversion ([§10.2.3](conversions.md#1023-implicit-numeric-conversions)) from `byte` to `int`.
377
-
>
378
-
>*endexample*
384
+
>*Example*:Givenan*enum_type* `E` withandunderlyingtypeof `int`, aconversionfrom `E` to `byte` isprocessedasanexplicitnumericconversion ([§10.3.2](conversions.md#1032-explicit-numeric-conversions)) from `int` to `byte`, andaconversionfrom `byte` to `E` isprocessedasanimplicitnumericconversion ([§10.2.3](conversions.md#1023-implicit-numeric-conversions)) from `byte` to `int`. *endexample*
379
385
380
386
### 10.3.4 Explicit nullable conversions
381
387
@@ -708,9 +714,9 @@ Specifically, an anonymous function `F` is compatible with a delegate type `D`
0 commit comments