-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Create C# How to Section index #4031
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
|
This is ready for a review @rpetrusha @mairaw |
rpetrusha
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.
I left a number of comments and suggestions, @BillWagner. I agree that the CodeDom articles can go. And I think that there is way too much LINQ content -- I suggested shortening the list to a few more simple topics per category, and eventually adding a LINQ how-to topics list in the LINQ docs. In terms of reflection, I'm somewhat mixed. But given that it's a purely framework and not a language topic, that seems to me to argue for its exclusion.
docs/csharp/how-to/index.md
Outdated
|
|
||
| # How to (C#) | ||
|
|
||
| The How to section of the C# Guide is where you can find quick answers |
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.
Better: In the How to section of the C# Guide, you can find...
docs/csharp/how-to/index.md
Outdated
| # How to (C#) | ||
|
|
||
| The How to section of the C# Guide is where you can find quick answers | ||
| to common questions. There are cases on this page were one article may |
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.
In some cases, articles are listed in multiple sections on this page. We want...
docs/csharp/how-to/index.md
Outdated
|
|
||
| ### Class and struct members | ||
|
|
||
| You create classes and structs to implement your program. These techniques are common tasks when writing classes or structs. |
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.
techniques and tasks are different things. Maybe "These techniques are commonly used when writing..."
docs/csharp/how-to/index.md
Outdated
| - [Override the `ToString` method to provide string output](../programming-guide/classes-and-structs/how-to-override-the-tostring-method.md). | ||
| - [Define abstract properties](../programming-guide/classes-and-structs/how-to-define-abstract-properties.md). | ||
| - [Use the xml documentation features to document your code](../programming-guide/xmldoc/how-to-use-the-xml-documentation-features.md). | ||
| - [Explicitly implement interface members](../programming-guide/interfaces/how-to-explicitly-implement-interface-members.md) to keep your public interface more clear. |
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.
"more clear" seems like the wrong phrase. Perhaps just small? Or lean?
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.
How about "concise"? I'd like to capture both size and clarity.
docs/csharp/how-to/index.md
Outdated
| - [Convert a string to a number](../programming-guide/types/how-to-convert-a-string-to-a-number.md). | ||
| - [Use `as` and `is` to safely cast to a different type](../programming-guide/types/how-to-safely-cast-by-using-as-and-is-operators.md). | ||
| - [Define conversion operators for `struct` types](../programming-guide/statements-expressions-operators/how-to-implement-user-defined-conversions-between-structs.md). | ||
| - [Determine if a type is a nullable type](../programming-guide/nullable-types/how-to-identify-a-nullable-type.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.
or just "Determine if a type is nullable"?
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.
I changed to nullable value type. I want to future-proof this against the upcoming non-nullable reference types. (The referenced article doesn't help determine nullable vs. non-nullable reference types, only value types.)
docs/csharp/how-to/index.md
Outdated
| - [Declare, instantiate, and use delegates](../programming-guide/delegates/how-to-declare-instantiate-and-use-a-delegate.md). | ||
| - [Combine multicast delegates](../programming-guide/delegates/how-to-combine-delegates-multicast-delegates.md). | ||
|
|
||
| Events provide a mechanism to publish notifications or subscribe to notifications. |
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.
publish notifications or subscribe to notifications --> publish or subscribe to notifications.
docs/csharp/how-to/index.md
Outdated
|
|
||
| Events provide a mechanism to publish notifications or subscribe to notifications. | ||
|
|
||
| - [Subscribe and unsubscrbe from events](../programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.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.
unsubscrbe --> unsubscribe
docs/csharp/how-to/index.md
Outdated
| Modern programs often use asynchronous operations. These articles will help you learn | ||
| to use these techniques. | ||
|
|
||
| - [Improve async performance using <xref:System.Threading.Tasks.Task.WhenAll%2A>](../programming-guide/concepts/async/how-to-extend-the-async-walkthrough-by-using-task-whenall.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.
Links within a link don't resolve, so replace the xref with backticks.
| ## Command line args to your program | ||
|
|
||
| Typically, C# programs have command line arguments. These articles teach you to access and process | ||
| those command line arguments. |
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.
Although both of the topics are about displaying command line arguments, I'd change the description here to retrieving them, which strikes me as a much more common operation than displaying them.
| - [Store event instances in a dictionary](../programming-guide/events/how-to-use-a-dictionary-to-store-event-instances.md). | ||
| - [Implement custom event accessors](../programming-guide/events/how-to-implement-custom-event-accessors.md). | ||
|
|
||
| ## LINQ practices |
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.
Yes, there really is too much LINQ content; the LINQ section really overshadows everything else. Most are also not so much language topics as LINQ topics. I think that I would pare this down to a few of the more basic topics in each category, and possibly plan to create a more thorough list of LINQ how to topics in the LINQ docs later.
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.
I pared it down to the first general How-tos. Those focus more on the query syntax, which is closer to the language.
|
@rpetrusha Thanks for the review. I updated this based on your feedback. In a couple spots I chose different wording than your proposed changes, and commented on those changes. Let me know what you think on this round. |
|
I think that this looks really good, @BillWagner, especially the pared-down LINQ section. It's ready to merge when you're ready. |
Over time, the existing How To articles will go in this section as they are updated for more common current scenarios.
In the meantime, the index provides a list of the existing How tos.
I have a few questions for @mairaw and @rpetrusha as I keep working on this:
Internal review link