Application.Startup

WPFにおけるアプリケーション開始時の初期化処理(ウィンドウが表示される前)などは、Application.Startupイベントで行う。

Application.Startup Event (System.Windows) | Microsoft Docs
WPF Tips(2) メインウィンドウが起動する前に処理を行う - 気楽なソフト工房

ウィンドウ表示前にメッセージボックスを出してみる。

WPFアプリケーション
WPFアプリケーション

WPFアプリケーションで、

App.xaml
App.xaml

ソリューションエクスプローラで、App.xamlをクリックし、

Startup
Startup

StartupUriの後ろに、Startupを追加。

イベントハンドラ
イベントハンドラ

新しいイベントハンドラの追加を促されるのでクリック。

Application_Startupハンドラ
Application_Startupハンドラ

Application_Startupハンドラが追加されたので、

メッセージボックスを出した後、Shutdownで終了する。

メッセージボックスが出た
メッセージボックスが出た

ウィンドウが表示される前に、メッセージボックスが出て、

終了
終了

ウィンドウが表示されずに終了。

Sample/wpf/Application/Startup/src/Application_ at master · bg1bgst333/Sample · GitHub

Form.Activated

フォームがユーザの操作によってアクティブになった時に、Form.Activatedイベントが発生する。

Form.Activated Event (System.Windows.Forms) | Microsoft Docs
Windowsフォームの表示直後に初期化処理を行うには?[2.0のみ、C#、VB]:.NET TIPS - @IT
全ては時の中に… : 【VB.NET】Shownイベントについて

Loadは1回切りだが、こちらはアクティブになるたびに呼ばれる。

Windowsアプリケーション
Windowsアプリケーション

Windowsアプリケーション。

今回はLabelを使う
今回はLabelを使う

今回はLabelを使う。

Labelを2つ置く
Labelを2つ置く

Labelを2つ置く。

Form1のActivated
Form1のActivated

Form1のActivatedでダブルクリック。

Form1_Activatedが起こるたびにiを1増やしてlabel1にセット。

Form1のLoad
Form1のLoad

Form1のLoadでダブルクリック。

Form1_Loadが起こるたびにjを1増やしてlabel2にセット。

最初1ずつ
最初1ずつ

最初1ずつだが、

ウィンドウをいったん隠す
ウィンドウをいったん隠す

いったん隠して、

アクティブにすると
アクティブにすると

アクティブにすると、iだけ増える。
何度繰り返してもiだけ増える。つまりActivatedだけが発生してる。

Sample/dotnet/Form/Activated/src/Form_ at master · bg1bgst333/Sample · GitHub

Type.GetType

Type.GetTypeにはいくつかあるが、静的でない引数無しのType.GetTypeは、Typeオブジェクトの現在のTypeを返す。

Type.GetType Method (System) | Microsoft Docs

MainClass.csで、

と書く。

tintはint型変数iのType。
t1はtintのType。

tint = System.Int32
t1 = System.RuntimeType
続行するには何かキーを押してください .

t1はTypeかとおもいきや、RuntimeType。

c# - When will GetType() return RunTimeType and when will it return the a Type like SampleProgram.MyClass1? - Stack Overflow
たいていは、RuntimeTypeらしい。
違うのもあるのかな。

Sample/dotnet/Type/GetType/src/Type_ at master · bg1bgst333/Sample · GitHub

dynamic

C#4.0では、dynamicを使って、動的型付け変数を宣言できる。

dynamic - C# リファレンス | Microsoft Docs
dynamic - C# によるプログラミング入門 | ++C++; // 未確認飛行 C

まずはVisualStudioの、

空のプロジェクト
空のプロジェクト

空のプロジェクトで、

MainClass.csを追加し、
MainClass.csを追加し、

MainClass.csを追加。

varで宣言した場合
varで宣言した場合

varで宣言した変数xは、10を代入した時点でintと推論されるので、"ABC"は代入できない。

dynamicでyを宣言
dynamicでyを宣言

dynamicでyを宣言し、いろんな型の値を入れてみる。
ブレークポイントを置いて観察。

yに100が代入
yに100が代入

yに100が代入。

yに"ABC"が代入
yに"ABC"が代入

yに"ABC"が代入。

yに1.23が代入
yに1.23が代入

yに1.23が代入。
このようにどんな値でも代入できる。
しかし、

出力できない
出力できない

出力できない。
他のクラスがdynamicに対応するためには参照の追加が必要なのかも。

参照設定から参照の追加
参照設定から参照の追加

参照設定から参照の追加。

Microsoft.CSharp.dllを追加
Microsoft.CSharp.dllを追加

Microsoft.CSharp.dllを追加。

今度は通ったっぽい。
今度は通ったっぽい。

今度は通ったっぽい。

最終的にMainClass.csをこうして、

x.GetType() = System.Int32
y.GetType() = System.Int32
y = 100
y.GetType() = System.String
y = ABC
y.GetType() = System.Double
y = 1.23
続行するには何かキーを押してください . . .

代入するたびに型が変わっているのがわかる。
dynamicの詳細についてはいずれ・・・。

Sample/cs/dynamic/dynamic/src/dynamic at master · bg1bgst333/Sample · GitHub

Console.WriteLine

Monoは、オープンソースの.NET互換環境。

GitHub - mono/mono: Mono open source ECMA CLI, C# and .NET implementation.
Home | Mono

LinuxC#などの.NETのプログラムを動かすには、これを使う。
mono-develのインストール。

$ sudo yum install mono-devel
[sudo] bg1 のパスワード:
メタデータの期限切れの最終確認: xx:xx:xx 時間前の xxxx年xx月xx日 xx時xx分xx秒 に実施しました。
依存関係が解決しました。
================================================================================
 パッケージ              アーキテクチャー
                                       バージョン           リポジトリ    サイズ
================================================================================
インストール:
 mono-devel              x86_64        4.8.0-12.fc28        fedora        5.3 M
依存関係をインストール中:
 libgdiplus              x86_64        5.6-2.fc29           fedora        176 k
 mono-core               x86_64        4.8.0-12.fc28        fedora         18 M
 mono-data               x86_64        4.8.0-12.fc28        fedora        4.4 M
 mono-data-sqlite        x86_64        4.8.0-12.fc28        fedora        103 k
 mono-extras             x86_64        4.8.0-12.fc28        fedora        465 k
 mono-mvc                x86_64        4.8.0-12.fc28        fedora        484 k
 mono-wcf                x86_64        4.8.0-12.fc28        fedora        946 k
 mono-web                x86_64        4.8.0-12.fc28        fedora        2.5 M
 mono-winforms           x86_64        4.8.0-12.fc28        fedora        1.6 M
 monodoc                 x86_64        4.8.0-12.fc28        fedora         19 M

トランザクションの概要
================================================================================
インストール  11 パッケージ

ダウンロードサイズの合計: 53 M
インストール済みのサイズ: 129 M
これでよろしいですか? [y/N]: y
パッケージのダウンロード中です:
(1/11): libgdiplus-5.6-2.fc29.x86_64.rpm         90 kB/s | 176 kB     00:01
(2/11): mono-data-sqlite-4.8.0-12.fc28.x86_64.r  67 kB/s | 103 kB     00:01
(3/11): mono-data-4.8.0-12.fc28.x86_64.rpm      602 kB/s | 4.4 MB     00:07
(4/11): mono-extras-4.8.0-12.fc28.x86_64.rpm     83 kB/s | 465 kB     00:05
(5/11): mono-devel-4.8.0-12.fc28.x86_64.rpm     478 kB/s | 5.3 MB     00:11
(6/11): mono-mvc-4.8.0-12.fc28.x86_64.rpm       125 kB/s | 484 kB     00:03
(7/11): mono-core-4.8.0-12.fc28.x86_64.rpm      1.1 MB/s |  18 MB     00:17
(8/11): mono-wcf-4.8.0-12.fc28.x86_64.rpm       230 kB/s | 946 kB     00:04
(9/11): mono-winforms-4.8.0-12.fc28.x86_64.rpm  523 kB/s | 1.6 MB     00:03
(10/11): mono-web-4.8.0-12.fc28.x86_64.rpm      573 kB/s | 2.5 MB     00:04
(11/11): monodoc-4.8.0-12.fc28.x86_64.rpm       1.7 MB/s |  19 MB     00:11
--------------------------------------------------------------------------------
合計                                            1.7 MB/s |  53 MB     00:31
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                        1/1
Installed: libgdiplus-5.6-2.fc29.x86_64
  インストール中   : libgdiplus-5.6-2.fc29.x86_64                          1/11
  scriptletの実行中: libgdiplus-5.6-2.fc29.x86_64                          1/11
Installed: libgdiplus-5.6-2.fc29.x86_64
Installed: mono-data-sqlite-4.8.0-12.fc28.x86_64
  インストール中   : mono-data-sqlite-4.8.0-12.fc28.x86_64                 2/11
Installed: mono-data-sqlite-4.8.0-12.fc28.x86_64
Installed: mono-extras-4.8.0-12.fc28.x86_64
  インストール中   : mono-extras-4.8.0-12.fc28.x86_64                      3/11
Installed: mono-extras-4.8.0-12.fc28.x86_64
Installed: mono-data-4.8.0-12.fc28.x86_64
  インストール中   : mono-data-4.8.0-12.fc28.x86_64                        4/11
Installed: mono-data-4.8.0-12.fc28.x86_64
Installed: mono-mvc-4.8.0-12.fc28.x86_64
  インストール中   : mono-mvc-4.8.0-12.fc28.x86_64                         5/11
Installed: mono-mvc-4.8.0-12.fc28.x86_64
Installed: mono-wcf-4.8.0-12.fc28.x86_64
  インストール中   : mono-wcf-4.8.0-12.fc28.x86_64                         6/11
Installed: mono-wcf-4.8.0-12.fc28.x86_64
Installed: mono-web-4.8.0-12.fc28.x86_64
  インストール中   : mono-web-4.8.0-12.fc28.x86_64                         7/11
Installed: mono-web-4.8.0-12.fc28.x86_64
Installed: mono-core-4.8.0-12.fc28.x86_64
  インストール中   : mono-core-4.8.0-12.fc28.x86_64                        8/11
Installed: mono-core-4.8.0-12.fc28.x86_64
Installed: mono-winforms-4.8.0-12.fc28.x86_64
  インストール中   : mono-winforms-4.8.0-12.fc28.x86_64                    9/11
Installed: mono-winforms-4.8.0-12.fc28.x86_64
Installed: monodoc-4.8.0-12.fc28.x86_64
  インストール中   : monodoc-4.8.0-12.fc28.x86_64                         10/11
Installed: monodoc-4.8.0-12.fc28.x86_64
Installed: mono-devel-4.8.0-12.fc28.x86_64
  インストール中   : mono-devel-4.8.0-12.fc28.x86_64                      11/11
  scriptletの実行中: mono-devel-4.8.0-12.fc28.x86_64                      11/11
Installed: mono-devel-4.8.0-12.fc28.x86_64
  検証             : libgdiplus-5.6-2.fc29.x86_64                          1/11
  検証             : mono-core-4.8.0-12.fc28.x86_64                        2/11
  検証             : mono-data-4.8.0-12.fc28.x86_64                        3/11
  検証             : mono-data-sqlite-4.8.0-12.fc28.x86_64                 4/11
  検証             : mono-devel-4.8.0-12.fc28.x86_64                       5/11
  検証             : mono-extras-4.8.0-12.fc28.x86_64                      6/11
  検証             : mono-mvc-4.8.0-12.fc28.x86_64                         7/11
  検証             : mono-wcf-4.8.0-12.fc28.x86_64                         8/11
  検証             : mono-web-4.8.0-12.fc28.x86_64                         9/11
  検証             : mono-winforms-4.8.0-12.fc28.x86_64                   10/11
  検証             : monodoc-4.8.0-12.fc28.x86_64                         11/11

インストール済み:
  mono-devel-4.8.0-12.fc28.x86_64          libgdiplus-5.6-2.fc29.x86_64
  mono-core-4.8.0-12.fc28.x86_64           mono-data-4.8.0-12.fc28.x86_64
  mono-data-sqlite-4.8.0-12.fc28.x86_64    mono-extras-4.8.0-12.fc28.x86_64
  mono-mvc-4.8.0-12.fc28.x86_64            mono-wcf-4.8.0-12.fc28.x86_64
  mono-web-4.8.0-12.fc28.x86_64            mono-winforms-4.8.0-12.fc28.x86_64
  monodoc-4.8.0-12.fc28.x86_64

完了しました!
$

MainClass.csで、

Console.WriteLineで文字列出力だけ。

mono - Mono Documentation
(HTTP500エラーでリンク切れてる?)
mono/Console.cs at master · mono/mono · GitHub

で、Mono製コンパイラmcsでコンパイルするのだが、

$ vi MainClass.cs
$ mcs MainClass.cs

Unhandled Exception:
System.TypeInitializationException: The type initializer for
'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException:
The type initializer for 'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
$

意味不明のExceptionが出る。
mcs自体がおかしい模様。

Can't install Mono from Mono repo for Fedora 29 · Issue #11937 · mono/mono · GitHub

これかなあ・・・。
Fedora28のRPM入れてみろってある・・・。

Fedora 29 and Mono 5

ここにも、「compat-giflibが~」とある。
やってみる。

$ pwd
/home/bg1/project/local/fedora29vm/tmp
$ wget
https://rpmfind.net/linux/fedora/linux/releases/28/Everything/x86_64/os/Packages/c/compat-giflib-4.1.6-1.fc28.x86_64.rpm
--2019-06-15 11:44:54--
https://rpmfind.net/linux/fedora/linux/releases/28/Everything/x86_64/os/Packages/c/compat-giflib-4.1.6-1.fc28.x86_64.rpm
rpmfind.net (rpmfind.net) をDNSに問いあわせています... 195.220.108.108
rpmfind.net (rpmfind.net)|195.220.108.108|:443 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 26540 (26K) [application/x-rpm]
`compat-giflib-4.1.6-1.fc28.x86_64.rpm' に保存中

compat-giflib-4.1.6 100%[===================>]  25.92K  93.3KB/s 時間 0.3s

2019-06-15 11:44:56 (93.3 KB/s) -
`compat-giflib-4.1.6-1.fc28.x86_64.rpm' へ保存完了 [26540/26540]

$ sudo dnf install compat-giflib-4.1.6-1.fc28.x86_64.rpm
[sudo] bg1 のパスワード:
Fedora Modular 29 - x86_64                      4.7 kB/s | 7.4 kB     00:01
Fedora Modular 29 - x86_64 - Updates            4.6 kB/s | 7.3 kB     00:01
Fedora 29 - x86_64 - Updates                    5.5 kB/s | 8.0 kB     00:01
Fedora 29 - x86_64                              5.2 kB/s | 7.5 kB     00:01
依存関係が解決しました。
================================================================================
 パッケージ          アーキテクチャー
                                  バージョン           リポジトリ         サイズ
================================================================================
インストール:
 compat-giflib       x86_64       4.1.6-1.fc28         @commandline        26 k

トランザクションの概要
================================================================================
インストール  1 パッケージ

合計サイズ: 26 k
インストール済みのサイズ: 41 k
これでよろしいですか? [y/N]: y
パッケージのダウンロード中です:
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                        1/1
Installed: compat-giflib-4.1.6-1.fc28.x86_64
  インストール中   : compat-giflib-4.1.6-1.fc28.x86_64                      1/1
  scriptletの実行中: compat-giflib-4.1.6-1.fc28.x86_64                      1/1
Installed: compat-giflib-4.1.6-1.fc28.x86_64
  検証             : compat-giflib-4.1.6-1.fc28.x86_64                      1/1

インストール済み:
  compat-giflib-4.1.6-1.fc28.x86_64

完了しました!
$

これでコンパイル

$ mcs MainClass.cs

Unhandled Exception:
System.TypeInitializationException: The type initializer for
'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException:
The type initializer for 'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
$

効果なし。
mono-completeとも書いてあったが、

$ sudo dnf install mono-complete
メタデータの期限切れの最終確認: xx:xx:xx 時間前の xxxx年xx月xx日 xx時xx分xx秒 に実施しました。
一致した引数がありません: mono-complete
エラー: 一致するものが見つかりません
$

そもそもFedoraにはmono-completeがない。
ググってもなかなか正解が見つからないので、Twitter検索してたら、

まさかの環境変数TERM・・・。

$ mcs

Unhandled Exception:
System.TypeInitializationException: The type initializer for
'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException:
The type initializer for 'System.Console' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.ConsoleDriver' threw an exception. ---> System.Exception:
Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer,
System.Int32& position) [0x0002b] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoReader..ctor (System.String term, System.String
filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term)
[0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
  at System.ConsoleDriver..cctor () [0x00062] in
<373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding,
System.Text.Encoding outputEncoding) [0x0000a] in
<373b6e083d6e45e498c9082a8eebd27f>:0
  at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in
<6c6b2f38a076460eacf227054ff6f99a>:0
$ export TERM=xterm
$ echo TERM
TERM
$ mcs
error CS2008: No files to compile were specified
Compilation failed: 1 error(s), 0 warnings
$

"export TERM=xterm"だけで、エラー内容が変わったので、うまくいったっぽい・・・。
あらためて、

$ pwd
/home/bg1/project/cloud/github.com/Sample/mono/Console/WriteLine/src/Console
$ vi MainClass.cs
$ ls
MainClass.cs
$ mcs MainClass.cs
$ ls
MainClass.cs  MainClass.exe
$ mono MainClass.exe
ABCDE
$

環境づくりでつまずいたが、ひとまず動いた。

Sample/mono/Console/WriteLine/src/Console at master · bg1bgst333/Sample · GitHub

gtk_window_new

GTK+は、マルチプラットフォームGUIツールキット。

The GTK Project

Xlibそのままでは作るのが大変な、ウィジェットや、コントロールなど、さまざまなコンポーネントが用意されている。
最初に、gtk_window_newでウィンドウを表示する。
まずはインストール。
GTK+は3が最新なので、gtk3-develをインストール。

$ sudo yum install gtk3-devel
[sudo] bg1 のパスワード:
メタデータの期限切れの最終確認: xx:xx:xx 時間前の xxxx年xx月xx日 xx時xx分xx秒 に実施しました。
依存関係が解決しました。
================================================================================
 パッケージ                  アーキテクチャー
                                        バージョン            リポジトリ  サイズ
================================================================================
インストール:
 gtk3-devel                  x86_64     3.24.1-3.fc29         updates     4.5 M
アップグレード:
 gtk3                        x86_64     3.24.1-3.fc29         updates     4.5 M
依存関係をインストール中:
 cmake-filesystem            x86_64     3.14.5-1.fc29         updates      16 k
 at-spi2-atk-devel           x86_64     2.30.0-1.fc29         fedora      9.6 k
 at-spi2-core-devel          x86_64     2.30.0-2.fc29         fedora      134 k
 atk-devel                   x86_64     2.30.0-1.fc29         fedora      179 k
 bzip2-devel                 x86_64     1.0.6-28.fc29         fedora      215 k
 cairo-devel                 x86_64     1.15.14-1.fc29        fedora      265 k
 cairo-gobject-devel         x86_64     1.15.14-1.fc29        fedora       11 k
 dbus-devel                  x86_64     1:1.12.10-1.fc29      fedora       36 k
 fontconfig-devel            x86_64     2.13.1-1.fc29         fedora      127 k
 freetype-devel              x86_64     2.9.1-2.fc29          fedora      441 k
 fribidi-devel               x86_64     1.0.5-1.fc29          fedora       58 k
 gdk-pixbuf2-devel           x86_64     2.38.0-4.fc29         fedora      215 k
 glib2-devel                 x86_64     2.58.1-1.fc29         fedora      465 k
 graphite2-devel             x86_64     1.3.10-6.fc29         fedora       41 k
 harfbuzz-devel              x86_64     1.8.7-1.fc29          fedora      178 k
 libXcomposite-devel         x86_64     0.4.4-15.fc29         fedora       16 k
 libXcursor-devel            x86_64     1.1.15-4.fc29         fedora       22 k
 libXdamage-devel            x86_64     1.1.4-15.fc29         fedora      9.4 k
 libXfixes-devel             x86_64     5.0.3-8.fc29          fedora       12 k
 libXft-devel                x86_64     2.3.2-11.fc29         fedora       18 k
 libXi-devel                 x86_64     1.7.9-8.fc29          fedora      101 k
 libXinerama-devel           x86_64     1.1.4-2.fc29          fedora       13 k
 libXrandr-devel             x86_64     1.5.1-8.fc29          fedora       19 k
 libXrender-devel            x86_64     0.9.10-8.fc29         fedora       16 k
 libXxf86vm-devel            x86_64     1.1.4-10.fc29         fedora       18 k
 libdrm-devel                x86_64     2.4.95-1.fc29         fedora      144 k
 libepoxy-devel              x86_64     1.5.3-1.fc29          fedora      140 k
 libglvnd-core-devel         x86_64     1:1.1.0-2.fc29        fedora       22 k
 libglvnd-devel              x86_64     1:1.1.0-2.fc29        fedora       13 k
 libglvnd-opengl             x86_64     1:1.1.0-2.fc29        fedora       39 k
 libicu-devel                x86_64     62.1-2.fc29           fedora      917 k
 libpng-devel                x86_64     2:1.6.34-6.fc29       fedora      310 k
 libtiff-devel               x86_64     4.0.9-11.fc29         fedora      496 k
 libuuid-devel               x86_64     2.32.1-1.fc29         fedora       29 k
 libxkbcommon-devel          x86_64     0.8.2-1.fc29          fedora       56 k
 mesa-libEGL-devel           x86_64     18.2.2-1.fc29         fedora       34 k
 mesa-libGL-devel            x86_64     18.2.2-1.fc29         fedora      160 k
 pango-devel                 x86_64     1.42.4-1.fc29         fedora      294 k
 pcre-cpp                    x86_64     8.42-4.fc29           fedora       27 k
 pcre-devel                  x86_64     8.42-4.fc29           fedora      533 k
 pcre-utf16                  x86_64     8.42-4.fc29           fedora      173 k
 pcre-utf32                  x86_64     8.42-4.fc29           fedora      164 k
 pixman-devel                x86_64     0.34.0-10.fc29        fedora       17 k
 wayland-devel               x86_64     1.16.0-1.fc29         fedora      138 k
 wayland-protocols-devel     noarch     1.16-1.fc29           fedora       74 k

トランザクションの概要
================================================================================
インストール    46 パッケージ
アップグレード   1 パッケージ

ダウンロードサイズの合計: 15 M
これでよろしいですか? [y/N]: y
パッケージのダウンロード中です:
(1/47): cmake-filesystem-3.14.5-1.fc29.x86_64.r 9.3 kB/s |  16 kB     00:01
(2/47): at-spi2-atk-devel-2.30.0-1.fc29.x86_64. 5.3 kB/s | 9.6 kB     00:01
(3/47): at-spi2-core-devel-2.30.0-2.fc29.x86_64 158 kB/s | 134 kB     00:00
(4/47): atk-devel-2.30.0-1.fc29.x86_64.rpm      190 kB/s | 179 kB     00:00
(5/47): bzip2-devel-1.0.6-28.fc29.x86_64.rpm    187 kB/s | 215 kB     00:01
(6/47): cairo-devel-1.15.14-1.fc29.x86_64.rpm   241 kB/s | 265 kB     00:01
(7/47): cairo-gobject-devel-1.15.14-1.fc29.x86_  22 kB/s |  11 kB     00:00
(8/47): dbus-devel-1.12.10-1.fc29.x86_64.rpm     44 kB/s |  36 kB     00:00
(9/47): gtk3-devel-3.24.1-3.fc29.x86_64.rpm     967 kB/s | 4.5 MB     00:04
(10/47): fontconfig-devel-2.13.1-1.fc29.x86_64. 245 kB/s | 127 kB     00:00
(11/47): fribidi-devel-1.0.5-1.fc29.x86_64.rpm   71 kB/s |  58 kB     00:00
(12/47): freetype-devel-2.9.1-2.fc29.x86_64.rpm 479 kB/s | 441 kB     00:00
(13/47): gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64 241 kB/s | 215 kB     00:00
(14/47): harfbuzz-devel-1.8.7-1.fc29.x86_64.rpm 241 kB/s | 178 kB     00:00
(15/47): glib2-devel-2.58.1-1.fc29.x86_64.rpm   545 kB/s | 465 kB     00:00
(16/47): graphite2-devel-1.3.10-6.fc29.x86_64.r  43 kB/s |  41 kB     00:00
(17/47): libXcomposite-devel-0.4.4-15.fc29.x86_  32 kB/s |  16 kB     00:00
(18/47): libXcursor-devel-1.1.15-4.fc29.x86_64.  42 kB/s |  22 kB     00:00
(19/47): libXdamage-devel-1.1.4-15.fc29.x86_64.  12 kB/s | 9.4 kB     00:00
(20/47): libXfixes-devel-5.0.3-8.fc29.x86_64.rp  26 kB/s |  12 kB     00:00
(21/47): libXft-devel-2.3.2-11.fc29.x86_64.rpm   37 kB/s |  18 kB     00:00
(22/47): libXrandr-devel-1.5.1-8.fc29.x86_64.rp  33 kB/s |  19 kB     00:00
(23/47): libXinerama-devel-1.1.4-2.fc29.x86_64.  20 kB/s |  13 kB     00:00
(24/47): libXi-devel-1.7.9-8.fc29.x86_64.rpm    106 kB/s | 101 kB     00:00
(25/47): libXrender-devel-0.9.10-8.fc29.x86_64.  43 kB/s |  16 kB     00:00
(26/47): libXxf86vm-devel-1.1.4-10.fc29.x86_64.  23 kB/s |  18 kB     00:00
(27/47): libdrm-devel-2.4.95-1.fc29.x86_64.rpm  280 kB/s | 144 kB     00:00
(28/47): libepoxy-devel-1.5.3-1.fc29.x86_64.rpm 202 kB/s | 140 kB     00:00
(29/47): libglvnd-core-devel-1.1.0-2.fc29.x86_6  70 kB/s |  22 kB     00:00
(30/47): libglvnd-devel-1.1.0-2.fc29.x86_64.rpm  39 kB/s |  13 kB     00:00
(31/47): libglvnd-opengl-1.1.0-2.fc29.x86_64.rp  48 kB/s |  39 kB     00:00
(32/47): libpng-devel-1.6.34-6.fc29.x86_64.rpm  400 kB/s | 310 kB     00:00
(33/47): libicu-devel-62.1-2.fc29.x86_64.rpm    708 kB/s | 917 kB     00:01
(34/47): libuuid-devel-2.32.1-1.fc29.x86_64.rpm  56 kB/s |  29 kB     00:00
(35/47): libtiff-devel-4.0.9-11.fc29.x86_64.rpm 683 kB/s | 496 kB     00:00
(36/47): libxkbcommon-devel-0.8.2-1.fc29.x86_64 111 kB/s |  56 kB     00:00
(37/47): mesa-libEGL-devel-18.2.2-1.fc29.x86_64  59 kB/s |  34 kB     00:00
(38/47): mesa-libGL-devel-18.2.2-1.fc29.x86_64. 191 kB/s | 160 kB     00:00
(39/47): pango-devel-1.42.4-1.fc29.x86_64.rpm   500 kB/s | 294 kB     00:00
(40/47): pcre-cpp-8.42-4.fc29.x86_64.rpm         27 kB/s |  27 kB     00:01
(41/47): pcre-utf16-8.42-4.fc29.x86_64.rpm      288 kB/s | 173 kB     00:00
(42/47): pcre-devel-8.42-4.fc29.x86_64.rpm      750 kB/s | 533 kB     00:00
(43/47): pcre-utf32-8.42-4.fc29.x86_64.rpm      285 kB/s | 164 kB     00:00
(44/47): pixman-devel-0.34.0-10.fc29.x86_64.rpm  31 kB/s |  17 kB     00:00
(45/47): wayland-devel-1.16.0-1.fc29.x86_64.rpm 268 kB/s | 138 kB     00:00
(46/47): wayland-protocols-devel-1.16-1.fc29.no 181 kB/s |  74 kB     00:00
(47/47): gtk3-3.24.1-3.fc29.x86_64.rpm          1.3 MB/s | 4.5 MB     00:03
--------------------------------------------------------------------------------
合計                                            817 kB/s |  15 MB     00:19
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                        1/1
Installed: libXfixes-devel-5.0.3-8.fc29.x86_64
  インストール中   : libXfixes-devel-5.0.3-8.fc29.x86_64                   1/48
Installed: libXfixes-devel-5.0.3-8.fc29.x86_64
Installed: libXrender-devel-0.9.10-8.fc29.x86_64
  インストール中   : libXrender-devel-0.9.10-8.fc29.x86_64                 2/48
Installed: libXrender-devel-0.9.10-8.fc29.x86_64
Installed: libXdamage-devel-1.1.4-15.fc29.x86_64
  インストール中   : libXdamage-devel-1.1.4-15.fc29.x86_64                 3/48
Installed: libXdamage-devel-1.1.4-15.fc29.x86_64
Installed: libpng-devel-2:1.6.34-6.fc29.x86_64
  インストール中   : libpng-devel-2:1.6.34-6.fc29.x86_64                   4/48
Installed: libpng-devel-2:1.6.34-6.fc29.x86_64
Installed: libdrm-devel-2.4.95-1.fc29.x86_64
  インストール中   : libdrm-devel-2.4.95-1.fc29.x86_64                     5/48
Installed: libdrm-devel-2.4.95-1.fc29.x86_64
Installed: libXxf86vm-devel-1.1.4-10.fc29.x86_64
  インストール中   : libXxf86vm-devel-1.1.4-10.fc29.x86_64                 6/48
Installed: libXxf86vm-devel-1.1.4-10.fc29.x86_64
Installed: libXcursor-devel-1.1.15-4.fc29.x86_64
  インストール中   : libXcursor-devel-1.1.15-4.fc29.x86_64                 7/48
Installed: libXcursor-devel-1.1.15-4.fc29.x86_64
Installed: libXrandr-devel-1.5.1-8.fc29.x86_64
  インストール中   : libXrandr-devel-1.5.1-8.fc29.x86_64                   8/48
Installed: libXrandr-devel-1.5.1-8.fc29.x86_64
Installed: libXcomposite-devel-0.4.4-15.fc29.x86_64
  インストール中   : libXcomposite-devel-0.4.4-15.fc29.x86_64              9/48
Installed: libXcomposite-devel-0.4.4-15.fc29.x86_64
Installed: libXi-devel-1.7.9-8.fc29.x86_64
  インストール中   : libXi-devel-1.7.9-8.fc29.x86_64                      10/48
Installed: libXi-devel-1.7.9-8.fc29.x86_64
Upgrade: gtk3-3.24.1-3.fc29.x86_64
  アップグレード中 : gtk3-3.24.1-3.fc29.x86_64                            11/48
Upgrade: gtk3-3.24.1-3.fc29.x86_64
Installed: wayland-protocols-devel-1.16-1.fc29.noarch
  インストール中   : wayland-protocols-devel-1.16-1.fc29.noarch           12/48
Installed: wayland-protocols-devel-1.16-1.fc29.noarch
Installed: wayland-devel-1.16.0-1.fc29.x86_64
  インストール中   : wayland-devel-1.16.0-1.fc29.x86_64                   13/48
Installed: wayland-devel-1.16.0-1.fc29.x86_64
Installed: pixman-devel-0.34.0-10.fc29.x86_64
  インストール中   : pixman-devel-0.34.0-10.fc29.x86_64                   14/48
Installed: pixman-devel-0.34.0-10.fc29.x86_64
Installed: pcre-utf32-8.42-4.fc29.x86_64
  インストール中   : pcre-utf32-8.42-4.fc29.x86_64                        15/48
Installed: pcre-utf32-8.42-4.fc29.x86_64
Installed: pcre-utf16-8.42-4.fc29.x86_64
  インストール中   : pcre-utf16-8.42-4.fc29.x86_64                        16/48
Installed: pcre-utf16-8.42-4.fc29.x86_64
Installed: pcre-cpp-8.42-4.fc29.x86_64
  インストール中   : pcre-cpp-8.42-4.fc29.x86_64                          17/48
Installed: pcre-cpp-8.42-4.fc29.x86_64
Installed: pcre-devel-8.42-4.fc29.x86_64
  インストール中   : pcre-devel-8.42-4.fc29.x86_64                        18/48
Installed: pcre-devel-8.42-4.fc29.x86_64
Installed: glib2-devel-2.58.1-1.fc29.x86_64
  インストール中   : glib2-devel-2.58.1-1.fc29.x86_64                     19/48
Installed: glib2-devel-2.58.1-1.fc29.x86_64
Installed: atk-devel-2.30.0-1.fc29.x86_64
  インストール中   : atk-devel-2.30.0-1.fc29.x86_64                       20/48
Installed: atk-devel-2.30.0-1.fc29.x86_64
Installed: libxkbcommon-devel-0.8.2-1.fc29.x86_64
  インストール中   : libxkbcommon-devel-0.8.2-1.fc29.x86_64               21/48
Installed: libxkbcommon-devel-0.8.2-1.fc29.x86_64
Installed: libuuid-devel-2.32.1-1.fc29.x86_64
  インストール中   : libuuid-devel-2.32.1-1.fc29.x86_64                   22/48
Installed: libuuid-devel-2.32.1-1.fc29.x86_64
Installed: libtiff-devel-4.0.9-11.fc29.x86_64
  インストール中   : libtiff-devel-4.0.9-11.fc29.x86_64                   23/48
Installed: libtiff-devel-4.0.9-11.fc29.x86_64
Installed: gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64
  インストール中   : gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64               24/48
Installed: gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64
Installed: libicu-devel-62.1-2.fc29.x86_64
  インストール中   : libicu-devel-62.1-2.fc29.x86_64                      25/48
Installed: libicu-devel-62.1-2.fc29.x86_64
Installed: libglvnd-opengl-1:1.1.0-2.fc29.x86_64
  インストール中   : libglvnd-opengl-1:1.1.0-2.fc29.x86_64                26/48
Installed: libglvnd-opengl-1:1.1.0-2.fc29.x86_64
Installed: libglvnd-core-devel-1:1.1.0-2.fc29.x86_64
  インストール中   : libglvnd-core-devel-1:1.1.0-2.fc29.x86_64            27/48
Installed: libglvnd-core-devel-1:1.1.0-2.fc29.x86_64
Installed: libglvnd-devel-1:1.1.0-2.fc29.x86_64
  インストール中   : libglvnd-devel-1:1.1.0-2.fc29.x86_64                 28/48
Installed: libglvnd-devel-1:1.1.0-2.fc29.x86_64
Installed: mesa-libEGL-devel-18.2.2-1.fc29.x86_64
  インストール中   : mesa-libEGL-devel-18.2.2-1.fc29.x86_64               29/48
Installed: mesa-libEGL-devel-18.2.2-1.fc29.x86_64
Installed: mesa-libGL-devel-18.2.2-1.fc29.x86_64
  インストール中   : mesa-libGL-devel-18.2.2-1.fc29.x86_64                30/48
Installed: mesa-libGL-devel-18.2.2-1.fc29.x86_64
Installed: libepoxy-devel-1.5.3-1.fc29.x86_64
  インストール中   : libepoxy-devel-1.5.3-1.fc29.x86_64                   31/48
Installed: libepoxy-devel-1.5.3-1.fc29.x86_64
Installed: libXinerama-devel-1.1.4-2.fc29.x86_64
  インストール中   : libXinerama-devel-1.1.4-2.fc29.x86_64                32/48
Installed: libXinerama-devel-1.1.4-2.fc29.x86_64
Installed: graphite2-devel-1.3.10-6.fc29.x86_64
  インストール中   : graphite2-devel-1.3.10-6.fc29.x86_64                 33/48
Installed: graphite2-devel-1.3.10-6.fc29.x86_64
Installed: harfbuzz-devel-1.8.7-1.fc29.x86_64
  インストール中   : harfbuzz-devel-1.8.7-1.fc29.x86_64                   34/48
Installed: harfbuzz-devel-1.8.7-1.fc29.x86_64
Installed: fribidi-devel-1.0.5-1.fc29.x86_64
  インストール中   : fribidi-devel-1.0.5-1.fc29.x86_64                    35/48
Installed: fribidi-devel-1.0.5-1.fc29.x86_64
Installed: bzip2-devel-1.0.6-28.fc29.x86_64
  インストール中   : bzip2-devel-1.0.6-28.fc29.x86_64                     36/48
Installed: bzip2-devel-1.0.6-28.fc29.x86_64
Installed: freetype-devel-2.9.1-2.fc29.x86_64
  インストール中   : freetype-devel-2.9.1-2.fc29.x86_64                   37/48
Installed: freetype-devel-2.9.1-2.fc29.x86_64
Installed: fontconfig-devel-2.13.1-1.fc29.x86_64
  インストール中   : fontconfig-devel-2.13.1-1.fc29.x86_64                38/48
Installed: fontconfig-devel-2.13.1-1.fc29.x86_64
Installed: cairo-devel-1.15.14-1.fc29.x86_64
  インストール中   : cairo-devel-1.15.14-1.fc29.x86_64                    39/48
Installed: cairo-devel-1.15.14-1.fc29.x86_64
Installed: cairo-gobject-devel-1.15.14-1.fc29.x86_64
  インストール中   : cairo-gobject-devel-1.15.14-1.fc29.x86_64            40/48
Installed: cairo-gobject-devel-1.15.14-1.fc29.x86_64
Installed: libXft-devel-2.3.2-11.fc29.x86_64
  インストール中   : libXft-devel-2.3.2-11.fc29.x86_64                    41/48
Installed: libXft-devel-2.3.2-11.fc29.x86_64
Installed: pango-devel-1.42.4-1.fc29.x86_64
  インストール中   : pango-devel-1.42.4-1.fc29.x86_64                     42/48
Installed: pango-devel-1.42.4-1.fc29.x86_64
Installed: cmake-filesystem-3.14.5-1.fc29.x86_64
  インストール中   : cmake-filesystem-3.14.5-1.fc29.x86_64                43/48
Installed: cmake-filesystem-3.14.5-1.fc29.x86_64
Installed: dbus-devel-1:1.12.10-1.fc29.x86_64
  インストール中   : dbus-devel-1:1.12.10-1.fc29.x86_64                   44/48
Installed: dbus-devel-1:1.12.10-1.fc29.x86_64
Installed: at-spi2-core-devel-2.30.0-2.fc29.x86_64
  インストール中   : at-spi2-core-devel-2.30.0-2.fc29.x86_64              45/48
Installed: at-spi2-core-devel-2.30.0-2.fc29.x86_64
Installed: at-spi2-atk-devel-2.30.0-1.fc29.x86_64
  インストール中   : at-spi2-atk-devel-2.30.0-1.fc29.x86_64               46/48
Installed: at-spi2-atk-devel-2.30.0-1.fc29.x86_64
Installed: gtk3-devel-3.24.1-3.fc29.x86_64
  インストール中   : gtk3-devel-3.24.1-3.fc29.x86_64                      47/48
Installed: gtk3-devel-3.24.1-3.fc29.x86_64
Upgraded: gtk3-3.24.1-1.fc29.x86_64
  整理             : gtk3-3.24.1-1.fc29.x86_64                            48/48
Upgraded: gtk3-3.24.1-1.fc29.x86_64
  scriptletの実行中: gtk3-3.24.1-1.fc29.x86_64                            48/48
  scriptletの実行中: gtk3-3.24.1-3.fc29.x86_64                            48/48
  検証             : cmake-filesystem-3.14.5-1.fc29.x86_64                 1/48
  検証             : gtk3-devel-3.24.1-3.fc29.x86_64                       2/48
  検証             : at-spi2-atk-devel-2.30.0-1.fc29.x86_64                3/48
  検証             : at-spi2-core-devel-2.30.0-2.fc29.x86_64               4/48
  検証             : atk-devel-2.30.0-1.fc29.x86_64                        5/48
  検証             : bzip2-devel-1.0.6-28.fc29.x86_64                      6/48
  検証             : cairo-devel-1.15.14-1.fc29.x86_64                     7/48
  検証             : cairo-gobject-devel-1.15.14-1.fc29.x86_64             8/48
  検証             : dbus-devel-1:1.12.10-1.fc29.x86_64                    9/48
  検証             : fontconfig-devel-2.13.1-1.fc29.x86_64                10/48
  検証             : freetype-devel-2.9.1-2.fc29.x86_64                   11/48
  検証             : fribidi-devel-1.0.5-1.fc29.x86_64                    12/48
  検証             : gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64               13/48
  検証             : glib2-devel-2.58.1-1.fc29.x86_64                     14/48
  検証             : graphite2-devel-1.3.10-6.fc29.x86_64                 15/48
  検証             : harfbuzz-devel-1.8.7-1.fc29.x86_64                   16/48
  検証             : libXcomposite-devel-0.4.4-15.fc29.x86_64             17/48
  検証             : libXcursor-devel-1.1.15-4.fc29.x86_64                18/48
  検証             : libXdamage-devel-1.1.4-15.fc29.x86_64                19/48
  検証             : libXfixes-devel-5.0.3-8.fc29.x86_64                  20/48
  検証             : libXft-devel-2.3.2-11.fc29.x86_64                    21/48
  検証             : libXi-devel-1.7.9-8.fc29.x86_64                      22/48
  検証             : libXinerama-devel-1.1.4-2.fc29.x86_64                23/48
  検証             : libXrandr-devel-1.5.1-8.fc29.x86_64                  24/48
  検証             : libXrender-devel-0.9.10-8.fc29.x86_64                25/48
  検証             : libXxf86vm-devel-1.1.4-10.fc29.x86_64                26/48
  検証             : libdrm-devel-2.4.95-1.fc29.x86_64                    27/48
  検証             : libepoxy-devel-1.5.3-1.fc29.x86_64                   28/48
  検証             : libglvnd-core-devel-1:1.1.0-2.fc29.x86_64            29/48
  検証             : libglvnd-devel-1:1.1.0-2.fc29.x86_64                 30/48
  検証             : libglvnd-opengl-1:1.1.0-2.fc29.x86_64                31/48
  検証             : libicu-devel-62.1-2.fc29.x86_64                      32/48
  検証             : libpng-devel-2:1.6.34-6.fc29.x86_64                  33/48
  検証             : libtiff-devel-4.0.9-11.fc29.x86_64                   34/48
  検証             : libuuid-devel-2.32.1-1.fc29.x86_64                   35/48
  検証             : libxkbcommon-devel-0.8.2-1.fc29.x86_64               36/48
  検証             : mesa-libEGL-devel-18.2.2-1.fc29.x86_64               37/48
  検証             : mesa-libGL-devel-18.2.2-1.fc29.x86_64                38/48
  検証             : pango-devel-1.42.4-1.fc29.x86_64                     39/48
  検証             : pcre-cpp-8.42-4.fc29.x86_64                          40/48
  検証             : pcre-devel-8.42-4.fc29.x86_64                        41/48
  検証             : pcre-utf16-8.42-4.fc29.x86_64                        42/48
  検証             : pcre-utf32-8.42-4.fc29.x86_64                        43/48
  検証             : pixman-devel-0.34.0-10.fc29.x86_64                   44/48
  検証             : wayland-devel-1.16.0-1.fc29.x86_64                   45/48
  検証             : wayland-protocols-devel-1.16-1.fc29.noarch           46/48
  検証             : gtk3-3.24.1-3.fc29.x86_64                            47/48
  検証             : gtk3-3.24.1-1.fc29.x86_64                            48/48

アップグレード済み:
  gtk3-3.24.1-3.fc29.x86_64

インストール済み:
  gtk3-devel-3.24.1-3.fc29.x86_64
  cmake-filesystem-3.14.5-1.fc29.x86_64
  at-spi2-atk-devel-2.30.0-1.fc29.x86_64
  at-spi2-core-devel-2.30.0-2.fc29.x86_64
  atk-devel-2.30.0-1.fc29.x86_64
  bzip2-devel-1.0.6-28.fc29.x86_64
  cairo-devel-1.15.14-1.fc29.x86_64
  cairo-gobject-devel-1.15.14-1.fc29.x86_64
  dbus-devel-1:1.12.10-1.fc29.x86_64
  fontconfig-devel-2.13.1-1.fc29.x86_64
  freetype-devel-2.9.1-2.fc29.x86_64
  fribidi-devel-1.0.5-1.fc29.x86_64
  gdk-pixbuf2-devel-2.38.0-4.fc29.x86_64
  glib2-devel-2.58.1-1.fc29.x86_64
  graphite2-devel-1.3.10-6.fc29.x86_64
  harfbuzz-devel-1.8.7-1.fc29.x86_64
  libXcomposite-devel-0.4.4-15.fc29.x86_64
  libXcursor-devel-1.1.15-4.fc29.x86_64
  libXdamage-devel-1.1.4-15.fc29.x86_64
  libXfixes-devel-5.0.3-8.fc29.x86_64
  libXft-devel-2.3.2-11.fc29.x86_64
  libXi-devel-1.7.9-8.fc29.x86_64
  libXinerama-devel-1.1.4-2.fc29.x86_64
  libXrandr-devel-1.5.1-8.fc29.x86_64
  libXrender-devel-0.9.10-8.fc29.x86_64
  libXxf86vm-devel-1.1.4-10.fc29.x86_64
  libdrm-devel-2.4.95-1.fc29.x86_64
  libepoxy-devel-1.5.3-1.fc29.x86_64
  libglvnd-core-devel-1:1.1.0-2.fc29.x86_64
  libglvnd-devel-1:1.1.0-2.fc29.x86_64
  libglvnd-opengl-1:1.1.0-2.fc29.x86_64
  libicu-devel-62.1-2.fc29.x86_64
  libpng-devel-2:1.6.34-6.fc29.x86_64
  libtiff-devel-4.0.9-11.fc29.x86_64
  libuuid-devel-2.32.1-1.fc29.x86_64
  libxkbcommon-devel-0.8.2-1.fc29.x86_64
  mesa-libEGL-devel-18.2.2-1.fc29.x86_64
  mesa-libGL-devel-18.2.2-1.fc29.x86_64
  pango-devel-1.42.4-1.fc29.x86_64
  pcre-cpp-8.42-4.fc29.x86_64
  pcre-devel-8.42-4.fc29.x86_64
  pcre-utf16-8.42-4.fc29.x86_64
  pcre-utf32-8.42-4.fc29.x86_64
  pixman-devel-0.34.0-10.fc29.x86_64
  wayland-devel-1.16.0-1.fc29.x86_64
  wayland-protocols-devel-1.16-1.fc29.noarch

完了しました!
$

インストールが完了したら、

GtkWindow: GTK+ 3 Reference Manual
はじめてみよう
各々の生き方: C/C++ Hello World ウィンドウ表示(GTK+)

gtk-window-newでウィンドウ作成。
GTK_WINDOW_TOPLEVELを付けると、トップレベルウィンドウになる。
gtk_window_new.cに、

と書く。

GTK+のウィンドウ
GTK+のウィンドウ

このようにウィンドウが表示できた。
しかし、

プログラムが終了しない
プログラムが終了しない

メインループのイベント処理がまだないので、閉じるボタンを押して、ウィンドウが閉じても、プログラムが終了しない。

Sample/gtk/gtk_window_new/gtk_window_new/src/gtk_window_new at master · bg1bgst333/Sample · GitHub

typeof

typeofで指定のクラスのType型を取得できる。

typeof - C# リファレンス | Microsoft Docs
C#で型を判別するtypeofとis演算子 - Ararami Studio

BaseClass.cs、DerivedClass1.cs、DerivedClass2.csは前回と同じで、MainClass.csは、

Object.GetTypeで取得したものとtypeofで取得したものが一致するか比較する。

baseType == baseT
d1Type == baseD1T
d2Type == baseD2T
続行するには何かキーを押してください . . .

一致する関係が出力された。

Sample/cs/typeof/typeof/src/typeof at master · bg1bgst333/Sample · GitHub