C# について:
C#からアプリケーションを実行するにはcmd、次の手順が必要です。
C:\Windows\Microsoft.NET\Framework\v4.0.30319ファイル システム上の場所に移動し、パスをコピーします。
- 右クリック
Computerして [プロパティ] に移動します。
- の下で、タブを
System Properties選択し、 をクリックします。AdvancedEnvironment Variables
- の下
Environment VariablesでUser Variables、 を選択しますNew。
Variable Name書き込みなどのためCSHARP_HOMEに、これを説明する必要がある場合は同じものを使用しています。手順 1でコピーしたものVariable Valueだけです。[OK] をクリックします。Paste
- 再度ステップ 4
pathを実行します。変数が存在しない場合は、単に選択しpathてクリックEditして次のことを実行できます (最後に;(セミコロン)Variable Valueを付けて書き込みます(またはステップ 5%CSHARP_HOME%\で使用したものを使用します)) 。 )。今回はwriteとuseを選択し、[OK] をクリックします。Variable NamepathVariable Value%CSHARP_HOME%\
- を開い
cmdて入力cscして押すENTERと、次のような出力が表示される場合があります

- ここで、この場所に (ファイル システム上で) このように CSharp プロジェクトのディレクトリ構造を作成しているとします
C:\Mine\csharp\command。ここでは、フォルダ内に 2 つのフォルダを作成しましcommandた。ソースとビルド。
Text Editor以下のように小さなサンプルプログラムを作成し(私はメモ帳++を使用しています)、フォルダの下に保存しますWinFormExample.cs:source
using System;
using System.Drawing;
using System.Windows.Forms;
namespace CSharpGUI {
public class WinFormExample : Form {
private Button button;
public WinFormExample() {
DisplayGUI();
}
private void DisplayGUI() {
this.Name = "WinForm Example";
this.Text = "WinForm Example";
this.Size = new Size(150, 150);
this.StartPosition = FormStartPosition.CenterScreen;
button = new Button();
button.Name = "button";
button.Text = "Click Me!";
button.Size = new Size(this.Width - 50, this.Height - 100);
button.Location = new Point(
(this.Width - button.Width) / 3 ,
(this.Height - button.Height) / 3);
button.Click += new System.EventHandler(this.MyButtonClick);
this.Controls.Add(button);
}
private void MyButtonClick(object source, EventArgs e) {
MessageBox.Show("My First WinForm Application");
}
public static void Main(String[] args) {
Application.Run(new WinFormExample());
}
}
}
- ここで入力
csc /out:build\WinFormExample.exe source\WinFormExample.csし(コンパイラオプションの詳細は最後に記載されています)、ENTER以下に示すように押してコンパイルします:

.\build\WinExample以下に示すように、
を使用して実行するだけです。
- これで、シンプルな
GUI Application作業が開始されました:-)
必要に応じて、同じことについても説明できJavaます:-)
詳細についてCompiler Optionsは、C# Compiler Options Listed Alphabeticallyを参照してください。