0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu18.04でC# Hello Worldメモ

0
Posted at

概要

UbuntuでC#の開発をしたかったのでHello Worldしたメモ。

以下の記事を参考に自分で試してみたメモなので、これらの記事以上の内容はありません。

環境

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Install Mono

$ sudo apt -y install mono-devel
$ mono --version
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen
$ mcs --version
Mono C# compiler version 4.6.2.0

Ubuntu18.04でC# Hello World

HelloWorld.cs
using System;

public class HelloWorld {
    public static void Main() {
        Console.WriteLine("hello world!");
    }
}
$ mcs ./HelloWorld.cs
$ ls
HelloWorld.cs  HelloWorld.exe
$ mono ./HelloWorld.exe
hello world!
$ ./HelloWorld.exe
hello world!

まとめ

Monoを使えばUbuntuでC#の開発ができそう

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?