Home Programming C Sharp REPL example

C Sharp REPL example

by shedboy71

Previously we showed you a C# example for your Raspberry Pi. We installed a text editor and then the mono development environment. We then created our c sharp example in our text editor , compiled and ran it. This typically is the way you write programs and develop but mono gives you another option called C# REPL, this is a interactive shell that is part of the mono development environment. More details available from http://www.mono-project.com/docs/tools+libraries/tools/repl/

Open up the terminal and type in csharp at the command prompt, you should see something like the following

csharp console

csharp console

In the following examples we will try some easy one liners using the Environment Class. More details can be found at https://msdn.microsoft.com/en-us/library/system.environment.osversion%28v=vs.110%29.aspx


[codesyntax lang=”csharp”]






You can see these and some other examples below

csharp REPL

csharp REPL

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More