So, you’ve started learning C#, and you’re all hyped up. But there is one problem. you don't know How To Download And Install C# With Visual Studio Community.
Don’t worry! We’ll help you, and you’ll be writing code in no time.
Because before you can turn your ideas into code, you need C# installed, along with a Code Editor, In this case, Visual Studio Community.
Let me take you step-by-step through this process and show you How To Download And Install C# With Visual Studio Community.
How To Download And Install C# With Visual Studio Community?
First, you have to download and install Visual Studio (correctly), which is a relevant Code Editor (to write your C# code). C# comes within Visual Studio, we select it in the installation options. Then you have to set up a couple of Visual Studio settings. Create your first C# File, and execute the first line of C# Code. And you’re all set up for conquering the C# world of Coding!
Let’s cover this in detail!
Here’s what we’ll be covering:
- Downloading and Installing Visual Studio Community
- Create a C# File, and execute with printing Hello World.
Download and Install Visual Studio (Community Edition)
To download Microsoft Visual Studio Click Here
Go to Downloads, and select the community version, as it is Free for everyone to download and use.
Now find where you Downloaded the executable Visual Studio Setup file and open it.
The installation Process is Pretty self-explanatory.
When you open the file, the Installer will open. Click Continue.
Then Visual Studio will Download and Install on its own.
After the above Process is Completed, a new window will pop up, as shown below.
Click on .NET desktop development.
On the right side, you can see what Tools will be installed.
Leave everything as default and click on Install.
It will take some time to install, depending on your internet connection.
It will install everything like The .NET Framework, the Just in Time Compiler, and more needed libraries.
After this finishes you can click on Launch to start Visual Studio.
Select Your Theme, as per your requirements. And leave the Developmental Settings to General.
You’ll be taken to this screen.
If you’ve followed along so far. Congratulations. You’ve successfully set up Visual Studio on your PC and now are ready to Code and learn how to take screenshot of a webpage in c#.
Print Hello World in C#
Now as we have Downloaded and installed both Visual Studio and Chrome Browser Successfully, we can continue with our Project on how to take screenshot of a webpage in c#.
Open Visual Studio, and set up a C# file
Click on “Create a new Project”
Select Console Application .net core
Why console? To make things simple.
This is also helpful if you want to turn this into an API, service, or a small script, in the future.
Name the Project. (In my case it is WebScreenShot.)
Save it into the relevant directory.
Select .NET 5, (you can also select 6 if you want)
Hit Create, and here we are in the C# File and environment where all the magic happens.
So, to print Hello world. Leave everything as it is.
Locate the Green “Play Button” in the Top Toolbar. And Press it.
And “Hello World” will Print in the Console.
I Hope, everything went correctly.
I highly recommend you check out this C# Tutorial of Taking Website Screenshot with Selenium
If you have any questions, you can post them in the comments below.
Also, check out our Youtube Channel for more!
Take Care and Happy Coding!