-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Restructure and modernize tour of C# #18538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cf5f052 to
04a27c4
Compare
04a27c4 to
d2de5e3
Compare
c5159cf to
399e6ca
Compare
ce617a2 to
a0297c9
Compare
52ba4a2 to
65ebbaa
Compare
65ebbaa to
d111614
Compare
20400b9 to
b933abd
Compare
b933abd to
f9181bb
Compare
69dcdd5 to
89b794b
Compare
Co-authored-by: Petr Kulikov <petr.kulikov@gmail.com>
…r/docs into program-structure-tour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @BillWagner - This was a ton of work, great job! It's so much better with your improvements. I left a lot of nit comments and some code suggestions. It's up to you if you want to take them or not. There were some typos and grammatical suggestions in there too. And even several questions!
Looks good to me,
when you're ready.
tdykstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work, clearly written and comprehensive! I had mostly minor typo comments but also noted one misplaced snippet.
docs/csharp/tour-of-csharp/types.md
Outdated
|
|
||
| ## Nullable types | ||
|
|
||
| Variables of any type may be declared as ***non-nullable*** or ***nullable***. A nullable variable can hold an additional `null` value, indicating no value. Nullable Value types (structs or enums) are represented by <xref:System.Nullable%601?displayProperty=nameWithType>. Non-nullable and Nullable Reference types are both represented by the underlying reference type. The distinction is represented by metadata read by the compiler and some libraries. The compiler provides warnings when nullable references are de-referenced without first checking their value against `null`. The compiler also provides warnings when non-nullable references are assigned to a value that may be `null`. The following example declares a ***nullable int***, initializing it to `null`. Then, it sets the value to `5`. It demonstrates the same concept with a ***nullable string***. For more information, see [nullable value types](language-reference/builtin-types/nullable-value-types.md) and [nullable reference types](../nullable-references.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can hold an additional null value
"additional" to what?
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com> Co-authored-by: David Pine <david.pine@microsoft.com>
And fix build warnings that crept in.
Fixes #9576
Fixes #13640
Fixes #16176
Fixes #18182
Fixes #18672
The Tour of C# has become very dated.
In this PR, I reviewed and updated each section:
cscInternal review link