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.
C# and Python share similar concepts. These familiar constructs help you learn C# when you already know Python.
async
and await
feature was directly inspired by C#'s async
and await
support.match
expression and pattern matching is similar to C#'s pattern matching switch
expression. You use them to inspect a complex data expression to determine if it matches a pattern.if
, else
, while
, for
, and many others. While not all syntax is the same, there's enough similarity that you can read C# if you know Python.As you start learning C#, you'll learn these important concepts where C# is different than Python:
;
separate statements, and other tokens {
and }
control block scope for if
and other block statements. However, for readability, most coding styles (including the style used in these docs) use indentation to reinforce the block scopes declared by {
and }
.itertools
, more-itertools
, and py-linq
provide similar functionality.Finally, there are some features of Python that aren't available in C#:
{
and }
to note block scope.Learning C# if you know Python is a smooth journey. The languages have similar concepts and similar idioms to use.
.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
Write your first code using C# (Get started with C#, Part 1) - Training
Learn the basic syntax and thought processes required to build simple applications using C#.
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.