dotnet.microsoft.com Open in urlscan Pro
2603:1062:10:b::1  Public Scan

Submitted URL: http://1710184515013.breakablekisystem.com/bf688a07-7c03-40ba-a8b9-50019d4b214c?n=2&t=1710184514240&l_next=ahr0chm6ly93d3cudmfydglub2xsb2xz...
Effective URL: https://dotnet.microsoft.com/en-us/languages/csharp
Submission: On March 12 via api from US — Scanned from US

Form analysis 1 forms found in the DOM

Name: searchFormGET https://www.microsoft.com/en-us/search/explore

<form class="c-search" autocomplete="off" id="searchForm" name="searchForm" role="search" action="https://www.microsoft.com/en-us/search/explore" method="GET"
  data-seautosuggest="{&quot;queryParams&quot;:{&quot;market&quot;:&quot;en-us&quot;,&quot;clientId&quot;:&quot;7F27B536-CF6B-4C65-8638-A0F8CBDFCA65&quot;,&quot;sources&quot;:&quot;Iris-Products,DCatAll-Products,Microsoft-Terms&quot;,&quot;filter&quot;:&quot;+ClientType:StoreWeb&quot;,&quot;counts&quot;:&quot;1,5,5&quot;},&quot;familyNames&quot;:{&quot;Apps&quot;:&quot;App&quot;,&quot;Books&quot;:&quot;Book&quot;,&quot;Bundles&quot;:&quot;Bundle&quot;,&quot;Devices&quot;:&quot;Device&quot;,&quot;Fees&quot;:&quot;Fee&quot;,&quot;Games&quot;:&quot;Game&quot;,&quot;MusicAlbums&quot;:&quot;Album&quot;,&quot;MusicTracks&quot;:&quot;Song&quot;,&quot;MusicVideos&quot;:&quot;Video&quot;,&quot;MusicArtists&quot;:&quot;Artist&quot;,&quot;OperatingSystem&quot;:&quot;Operating System&quot;,&quot;Software&quot;:&quot;Software&quot;,&quot;Movies&quot;:&quot;Movie&quot;,&quot;TV&quot;:&quot;TV&quot;,&quot;CSV&quot;:&quot;Gift Card&quot;,&quot;VideoActor&quot;:&quot;Actor&quot;}}"
  data-seautosuggestapi="https://www.microsoft.com/msstoreapiprod/api/autosuggest"
  data-m="{&quot;cN&quot;:&quot;GlobalNav_Search_cont&quot;,&quot;cT&quot;:&quot;Container&quot;,&quot;id&quot;:&quot;c3c1c9c3m1r1a1&quot;,&quot;sN&quot;:3,&quot;aN&quot;:&quot;c1c9c3m1r1a1&quot;}" aria-expanded="false" style="overflow-x: visible;">
  <div class="x-screen-reader" aria-live="assertive"></div>
  <input id="cli_shellHeaderSearchInput" aria-label="Search Expanded" aria-autocomplete="list" aria-expanded="false" aria-controls="universal-header-search-auto-suggest-transparent" aria-owns="universal-header-search-auto-suggest-ul" type="search"
    name="q" role="combobox" placeholder="Search Microsoft.com" data-m="{&quot;cN&quot;:&quot;SearchBox_nav&quot;,&quot;id&quot;:&quot;n1c3c1c9c3m1r1a1&quot;,&quot;sN&quot;:1,&quot;aN&quot;:&quot;c3c1c9c3m1r1a1&quot;}" data-toggle="tooltip"
    data-placement="right" title="" style="overflow-x: visible;">
  <button id="search" aria-label="Search Microsoft.com" class="c-glyph" data-m="{&quot;cN&quot;:&quot;Search_nav&quot;,&quot;id&quot;:&quot;n2c3c1c9c3m1r1a1&quot;,&quot;sN&quot;:2,&quot;aN&quot;:&quot;c3c1c9c3m1r1a1&quot;}" data-bi-mto="true"
    aria-expanded="false" style="overflow-x: visible;">
    <span role="presentation" style="overflow-x: visible;">Search</span>
    <span role="tooltip" class="c-uhf-tooltip c-uhf-search-tooltip" style="overflow-x: visible;">Search Microsoft.com</span>
  </button>
  <div class="m-auto-suggest" id="universal-header-search-auto-suggest-transparent" role="group" style="overflow-x: visible;">
    <ul class="c-menu" id="universal-header-search-auto-suggest-ul" aria-label="Search Suggestions" aria-hidden="true" data-bi-dnt="true" data-bi-mto="true" data-js-auto-suggest-position="default" role="listbox" data-tel="jsll"
      data-m="{&quot;cN&quot;:&quot;search suggestions_cont&quot;,&quot;cT&quot;:&quot;Container&quot;,&quot;id&quot;:&quot;c3c3c1c9c3m1r1a1&quot;,&quot;sN&quot;:3,&quot;aN&quot;:&quot;c3c1c9c3m1r1a1&quot;}" style="overflow-x: visible;"></ul>
    <ul class="c-menu f-auto-suggest-no-results" aria-hidden="true" data-js-auto-suggest-postion="default" data-js-auto-suggest-position="default" role="listbox" style="overflow-x: visible;">
      <li class="c-menu-item" style="overflow-x: visible;"> <span tabindex="-1" style="overflow-x: visible;">No results</span></li>
    </ul>
  </div>
</form>

Text Content

ic_fluent_brand_facebook_48_mono Created with Sketch.



Skip to main content
Microsoft
.NET
.NET
.NET
 * Home
 * Why .NET
    * What is .NET?
    * Why choose .NET?
    * Who uses .NET?

 * Features
    * Web Web
      * ASP.NET Core
      * Web APIs
      * Blazor
      * MVC
      * SignalR
      * Microservices
    * Native Desktop & Mobile Native Desktop & Mobile
      * .NET Multi-platform App UI
      * Windows Forms
      * Windows Presentation Foundation
      * Xamarin
    * Languages Languages
      * C#
      * F#
      * Visual Basic
    * More More
      * Cloud
      * Data
      * Artificial Intelligence & ML
      * Game development
      * Internet of Things
      * Upgrade Assistant

 * Learn
    * Learn to code C#
    * Beginner videos
    * Architecture guides
    * Tutorials, courses, and more

 * Docs
    * Web Web
      * ASP.NET Core
      * Web APIs
      * Blazor
      * Razor Pages
      * MVC
      * SignalR
    * Native Desktop & Mobile Native Desktop & Mobile
      * .NET Multi-platform App UI
      * Windows Forms
      * Windows Presentation Foundation
      * Xamarin
    * Languages Languages
      * C#
      * F#
      * Visual Basic
    * More More
      * .NET
      * Cloud
      * Data
      * Internet of Things
      * Machine learning

 * Downloads
 * Community
 * More
 * LIVE TV

 * All Microsoft
   
   
    * GLOBAL
      
      * Microsoft Security
      * Azure
      * Dynamics 365
      * Microsoft 365
      * Microsoft Teams
      * Windows 365
    * Tech & innovation Tech & innovation
      * Microsoft Cloud
      * AI
      * Azure Space
      * Mixed reality
      * Microsoft HoloLens
      * Microsoft Viva
      * Quantum computing
      * Sustainability
    * Industries Industries
      * Education
      * Automotive
      * Financial services
      * Government
      * Healthcare
      * Manufacturing
      * Retail
      * All industries
    * Partners Partners
      * Find a partner
      * Become a partner
      * Partner Network
      * Find an advertising partner
      * Become an advertising partner
      * Azure Marketplace
      * AppSource
    * Resources Resources
      * Blog
      * Microsoft Advertising
      * Developer Center
      * Documentation
      * Events
      * Licensing
      * Microsoft Learn
      * Microsoft Research
    * View Sitemap


Search Search Microsoft.com
 * No results

Cancel
 1. Home
 2. Languages
 3. C#


C#

The modern, innovative, open-source programming language for building all your
apps.

Get started


WHY C#

C# is a modern, innovative, open-source, cross-platform object-oriented
programming language and one of the top 5 programming languages on GitHub.

Do you have experience with JavaScript, Java, or C++? You'll find C# instantly
familiar, and you'll enjoy its evolving features including type safety,
generics, pattern matching, async, records, and more.

We hope you'll fall in love with C# from the very first keystroke.


TRY C#

 * Hello World
 * String Interpolation
 * Language-Integrated Query (LINQ)
 * Pattern Matching
 * Records

C# documentation

Press Alt+F1 for accessibility options.

                Console.WriteLine("Hello World");

var names = new[] { "Ana", "Felipe", "Emillia" };
foreach(var name in names)
{
    Console.WriteLine($"Hello {name}");
}
            

Run CodeNext Step
Success! You can continue to the next step.

Powered by Try .NET

Console


Press Alt+F1 for accessibility options.

                var (name, price, perPackage) = ("pizza dough", 1.99m, 3);

var date = DateTime.UtcNow;

Console.WriteLine(
    $"On {date.ToLongDateString()} at {date.ToShortTimeString()}, \n"+
    $"the price of {name.ToUpper()} \n" +
    $"was {price} per {perPackage} packages.");
            

Run CodeNext Step
Success! You can continue to the next step.

Powered by Try .NET

Console


Press Alt+F1 for accessibility options.

                var names = new[] { "Ana", "Felipe", null, "Emillia" };

names.Where(name => name?.Length > 5)
     .OrderBy(name => name)
     .ToList()
     .ForEach(Console.WriteLine);
            

Run CodeNext Step
Success! You can continue to the next step.

Powered by Try .NET

Console



public static double ComputeArea(object shape)
    => shape switch
    {
        Square s => s.Side * s.Side,
        Circle c => c.Radius * c.Radius * Math.PI,
        Rectangle r => r.Height * r.Length,

        _ => throw new ArgumentException(
                message: "Unrecognizable shape",
                paramName: nameof(shape))
    };



Person person = new("Nancy", "Davolio");

Console.WriteLine(person);
// Output: Person { FirstName = Nancy, LastName = Davolio }

public record Person(string FirstName, string LastName);










PRODUCTIVE DEVELOPER ENVIRONMENT

Build your apps faster with world-class developer tools that help you write
precise, accurate, and maintainable code the first time.

Use a wide variety of tools that fit your development style available on every
platform including Visual Studio Code (an advanced code editor), Visual Studio
(a powerful IDE), command-line tools, and other popular tools.

Learn about tools for C#


LOVED BY DEVELOPERS, TRUSTED BY ENTERPRISE

C# is one of the top 5 languages used by projects on GitHub and is consistently
one of the most loved languages on Stack Overflow's developer survey.

Hundreds of thousands of companies worldwide use C# to power their business
across a vast array of industries including media, finance, healthcare, gaming,
and more.

Explore customer stories


AN OPEN, VIBRANT COMMUNITY

Become part of our community of over 5 million developers for you to get support
and learn from on Stack Overflow, Microsoft Q&A, .NET Live TV, YouTube, and
more.

C# is open source on GitHub. Get involved and join the developers and companies
already contributing to it.

Join the .NET community


BUILD ANYTHING WITH C#

C# is the most popular language for .NET development. With .NET you can target
any application type running on any platform. Reuse your skills, code, and
favorite libraries across all of them in a familiar environment. That means you
can build apps faster, with less cost.

From mobile applications running on iOS and Android, to enterprise server
applications running on Windows Server and Linux, or high-scale microservices
running in the cloud, .NET provides a solution for you.

Learn about the .NET platform


LEARN C# WITH DEVELOPERS

Explore the concepts and syntax of the C# programming language with live coding
demos in our C# for Beginners video series.

Once you learn the basics, explore other lessons at the .NET videos page where
you can learn to build any type of app with C#.

Browse all lessons



Data sourced from official tests available at TechEmpower Round 21.


PERFORMANCE WHERE IT MATTERS

.NET is fast. Really fast! That means applications provide better response times
and require less compute power.

The popular TechEmpower benchmark compares web application frameworks with tasks
like JSON serialization, database access, and server side template rendering -
.NET performs faster than any other popular framework.


MADE IT THIS FAR, BUT NOT READY TO INSTALL?

Our in-browser tutorial will get you started learning C# today. No install
needed.

Get started

Follow us
 * 
 * 
 * 
 * 
 * 
 * 

English (United States) Español 日本語 한국어 Português (Brasil) 中文(简体)
Dark mode

Your Privacy Choices Opt-Out Icon Your Privacy Choices Your Privacy Choices
Opt-Out Icon Your Privacy Choices
 * Powered by .NET 8.0.3
 * Contact Microsoft
 * Support
 * Privacy & Cookies
 * Manage cookies
 * Terms of Use
 * Trademarks
 * © Microsoft 2024

Feedback