Showing posts with label VS Community 2017. Show all posts
Showing posts with label VS Community 2017. Show all posts

Wednesday, March 21, 2018

Can I run C# code interactively in Visual Studio Community 2017?

Yes, of course.
Let us run a few calculations with numbers x and y and write the result.

We need to bring up the C# interactive screen. You can do this from the Start Page's View menu item as shown.


There are 4 toolbar items on C# Interactive, Left to right they are reset, clear, history up(up arrow) and history down (down arrow). The Compiler is rather slow.


You can enter line by line into this window as shown.
--------
> 2*3
6

-----------
After entering the line press ENTER.

If you want to enter multiple lines without executing each line, you can enter SHIFT+ENTER and that puts a new line starting from a dot, and you can enter the next line.

At the end of your statement you can enter to execute the code.

Here are a few lines of code execution interactively:

> int x = 4;
. int y = 6;
. x*y
24
> WriteLine(x*y)
24

You can also cut and paste code and run it. Notice that the new lines start with a dot.

This is the code.
void Multiply(int x, int y)
{
 WriteLine($"Multiplying {x} and {y} you get :{x*y}");
}




Monday, November 6, 2017

How do you install Visual Studio Community 2017?

Visual Studio has grown a lot and it is really humongous with several different kinds of Works loads.
You can install to work with all kinds of work loads or you can pick and choose on the page "Installing -Visual Studio Community 2017 - 15.4.2.





For example I have chosen to install the following:

Summary
Visual Studio core editor
.NET desktop development
ASP.NET and web development
Node.js development
Data science and analytical applications
Mobile development with .NET
Visual Studio extension development
.NET Core cross-platform development
Universal Windows Platform development
Data storage and processing
Mobile development with JavaScript

I have left out C++, Python, Azure, Office/SharePoint development, game development and Linux development with C++.

Choose your workloads here:


Just choosing the above I need a whopping ~54 GB that is just for using the English language pack.


You start your download here:
https://www.visualstudio.com/vs/community/