Is there any way to run C # from the command line in interactive mode?

9

I'm used to using PHP and Python, languages that allow you to run in the command line in interactive mode, so it's easier to test or learn something new, since I do not have to compile all the time (as it is in case of C #).

Is there any way to use C # in the command line in interactive mode?

For example, in Python I can do this:

$ python
>>> 1 + 2
>>> # 3

The answer might be for Windows , but if you have some way to do it in Linux , I'd be grateful for a solution.

I use the Ubuntu 14.04 operating system.

    
asked by anonymous 17.05.2016 / 21:44

2 answers

8

There have been quite a few options for a long time, now you have a official component working alongside Visual Studio 2015 Update 1 forward (but does not need it to work). More information on Scott Hanselman's blog .

It works with .Net Core on Linux, but I do not have information on how support is, whether it needs any additional effort or is ready for use.

Matter in MSDN Magazine .

Other options (some online only):

17.05.2016 / 21:46
5

There is an official component in Visual Studio 2015 for this.

Just enter View > Other windows > C# interactive that a panel will open.

Font

    
17.05.2016 / 21:46