Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In the How to section of the C# Guide, you can find quick answers to common questions. In some cases, articles may be listed in multiple sections. We wanted to make them easy to find for multiple search paths.
There are several tips and tricks that are common C# developer practices:
enum
type using extension methods.You create classes, records, and structs to implement your program. These techniques are commonly used when writing classes, records, or structs.
ToString
method to provide string output.These articles help you work with collections of data.
Strings are the fundamental data type used to display or manipulate text. These articles demonstrate common practices with strings.
String.Split
to separate strings.You may need to convert an object to a different type.
DateTime
.as
and is
operators to safely cast to a different type.You may create types that define their own rules for equality or define a natural ordering among objects of that type.
.NET programs report that methods did not successfully complete their work by throwing exceptions. In these articles you'll learn to work with exceptions.
try
and catch
.finally
clauses.Delegates and events provide a capability for strategies that involve loosely coupled blocks of code.
Events provide a mechanism to publish or subscribe to notifications.
LINQ enables you to write code to query any data source that supports the LINQ query expression pattern. These articles help you understand the pattern and work with different data sources.
var
in query expressions.Modern programs often use asynchronous operations. These articles will help you learn to use these techniques.
System.Threading.Tasks.Task.WhenAll
.async
and await
.Typically, C# programs have command line arguments. These articles teach you to access and process those command line arguments.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Learning path
Work with variable data in C# console applications (Get started with C#, Part 4) - Training
Work with variable data in C# console applications (Get started with C#, Part 4)
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.