業界トップクラスの求人数を誇る転職エージェントPR

リクルートグループのコネクションを活かした非公開求人も充実、他にはない好条件の求人と出会える

7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

概要

C#とGoの出力処理・文法の比較

C#の出力

using System;

namespace QiitaLesson
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World");
        }
    }
}

・usingで基本的な機能の読み込み
・namespaceで名前空間を作成
・クラスを作成
・プログラムが実行されるときに最初に呼び出されるメソッドである
Mainメソッドを作成

Goの出力

package main
import "fmt"
func main(){
    
    fmt.Println("Hello World")
}

・プログラムが開始されるmainパッケージを作成
・importでパッケージをインポート
・func 関数名で関数を作成

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?