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
Overtime, thespecificationfor partial methods has evolved, resulting in restricted and unrestricted versions. A ***restricted partial method*** has no explicit access modifiers (andisimplicitlyprivate), hasa `void` returntype, andhasnooutparameters. An***unrestrictedpartialmethod***isapartialmethodthathasexplicitaccessmodifiers, anon-`void` returntype, oranyoutparameters.
Copy file name to clipboardExpand all lines: standard/types.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -927,10 +927,13 @@ Every expression has one of three ***null state***s:
927
927
928
928
The ***default null state*** of an expression is determined by its type, and the state of the annotations flag when it is declared:
929
929
930
-
- The default null state of a nullable reference type is:
931
-
- Maybe null when its declaration is in text where the annotations flag is enabled.
932
-
- Not null when its declaration is in text where the annotations flag is disabled.
933
-
- The default null state of a non-nullable reference type is not null.
930
+
- The default state of the `null` literal ([§6.4.5.7](lexical-structure.md#6457-the-null-literal)) ismaybenull.
931
+
- Thedefaultstateofadefaultvalueexpression ([§12.8.21](expressions.md#12821-default-value-expressions)) isnotnull when the type is a non-nullable value type, otherwise maybe null.
> *Note:*The*maybedefault*stateisusedwithunconstrainedtypeparameters when the type is a non-nullable type, such as `string` and the expression `default(T)` is the null value. Because null is not in the domain for the non-nullable type, the state is maybe default. *end note*
936
939
@@ -1226,4 +1229,24 @@ A compiler may issue a warning when nullability differs in either direction in t
0 commit comments