標準C#入門

読書メモ:第4章 繰り返し、条件分岐、例外処理

switch switchにはstringも使える。

読書メモ:第3章 演算子

typeof typeofは型にしか使えない。変数については GetType()を使う模様。 class Test { public static void Main() { object[] a = new object[5]; a[0] = (byte)1; a[1] = 123UL; a[2] = "abc"; a[3] = new object(); foreach (object x in a) { if (x != …

読書メモ:第2章 データ型と変数

1章は飛ばして2章へ。 単純型 符号付き整数 型名 バイト数 構造体名 sbyte 1 System.SByte short 2 System.Int16 int 4 System.Int32 long 8 System.Int64 符号なし整数 型名 バイト数 構造体名 byte 1 System.Byte ushort 2 System.UInt16 uint 4 System.…