Today, we are talking about an interesting tool Try .NET that attracted the developer, it helps them to write and execute the code in the same place,

What is Try .NET?
Try .NET is an interactive documentation generator for .NET Core that can be used online or offline.
How to use Try .NET Online?
- Go to this link https://try.dot.net/
- Write the code in .NET Editor and then click on Run to view the result
Try .NET Online example:
In this example, I will show a "Hello World" using C#.
Console.WriteLine("Hello World");
To show the output, just click on Run to prints hello world in the Output section as shown below.

How to use Try .NET Offline?
To use Try .NET offline, you should do the following:
- Open the command prompt.
- Type the below command line to install Try.NET.
dotnet tool install --global dotnet-try
- Now, type the below command line to clone the sample folder.
C:\Users\User\Desktop>git clone https://github.com/dotnet/try-samples
Cloning into 'try-samples'...
remote: Enumerating objects: 376, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
Receiving objects: 91% (343/376)ed 3 (delta 0), pack-reused 364 eceiving objects: 90% (339/376)
Receiving objects: 100% (376/376), 190.82 KiB | 1.25 MiB/s, done.
Resolving deltas: 100% (149/149), done.

Try .NET Demo
See Also