X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=man%2Fcsharp.1;h=50cbdc86508fd2126437eafdc2b20369563ace69;hb=a1e8d3de9a3794443d27f0989f43bb96b31faf76;hp=494af934a4bd2812db9f4c89d2beb504dc242c77;hpb=1c70a4edf8d132b4b08b888940367760d2c952e9;p=mono.git diff --git a/man/csharp.1 b/man/csharp.1 index 494af934a4b..50cbdc86508 100644 --- a/man/csharp.1 +++ b/man/csharp.1 @@ -6,7 +6,7 @@ .SH NAME csharp, gsharp \- Interactive C# Shell .SH SYNOPSIS -.B csharp [--attach PID] +.B csharp [--attach PID] [-e EXPRESSION] [file1 [file2]] [options] .P .B gsharp [file1 [file2]] @@ -27,9 +27,24 @@ into the main loop of a Gtk# application, avoiding any problems arising from the multi-threaded nature of injecting itself into a target process. .PP -This version allows a number of scripts to be specified in the command -line. +Files specified in the command line will be loaded and executed as +scripts. +.PP +Starting with Mono 2.10, the +.I csharp +command can be used as an interpreter executed by executables flagged +with the Unix execute attribute. To do this, make the first line of +your C# source code look like this: +.nf +"#!/usr/bin/csharp" +Console.WriteLine ("Hello, World"); +.fi .SH OPTIONS +The commands accept all of the commands that are available to the +.I mcs +command, so you can reference assemblies, specify paths, language +level and so on from the command line. In addition, the following +command line options are supported: .TP .I "\-\-attach" This is an advanced option and should only be used if you have a deep @@ -42,6 +57,9 @@ special measures to avoid crashing the target application while using it. For example, you might have to take the proper locks before issuing any commands that might affect the target process state, or sending commands through a method dispatcher. +.TP +.I "\-e" EXPRESSION +This will evaluate the specified C# EXPRESSION and exit .SH OPERATION Once you launch the csharp command, you will be greeted with the interactive prompt: