F# と C# の記法比較

MSDN F# リファレンスを使い C# と記法を比較する

エントリ ポイント

エントリ ポイント Entry Point

元ネタ http://msdn.microsoft.com/ja-jp/library/dd402151.aspx

簡単な main 関数の例を次に示します。

[<EntryPoint>]
let main args =
    printfn "Arguments passed to function : %A" args
    // Return 0. This indicates success.
    0

C# の場合は、こんな感じ。Main 関数が呼び出される。

C#

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine( "Arguments passed to function : {0}", args );
    }