C# Language Getting started with C# Language Creating a new query using LinqPad

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

LinqPad is a great tool that allows you to learn and test features of .Net languages (C#, F# and VB.Net.)

  1. Install LinqPad

  2. Create a new Query (Ctrl + N) enter image description here

  3. Under language, select "C# statements" enter image description here

  4. Type the following code and hit run (F5)

    string hw = "Hello World";
    
    hw.Dump(); //or Console.WriteLine(hw);
    

enter image description here

  1. You should see "Hello World" printed out in the results screen. enter image description here
  2. Now that you have created your first .Net program, go and check out the samples included in LinqPad via the "Samples" browser. There are many great examples that will show you many different features of the .Net languages. enter image description here

Notes:

  1. If you click on "IL", you can inspect the IL code that your .net code generates. This is a great learning tool. enter image description here
  2. When using LINQ to SQL or Linq to Entities you can inspect the SQL that's being generated which is another great way to learn about LINQ.


Got any C# Language Question?