GetType で型を出力する
float val = 1.0f;
print(val.GetType());
型の種類
| 型 | 出力 |
|---|---|
| int | System.Int32 |
| float | System.Single |
| bool | System.Boolean |
| List | System.Collections.Generic.List`1 |
他にもたくさんの型が存在します。徐々に覚えていきましょう。
float val = 1.0f;
print(val.GetType());
| 型 | 出力 |
|---|---|
| int | System.Int32 |
| float | System.Single |
| bool | System.Boolean |
| List | System.Collections.Generic.List`1 |
他にもたくさんの型が存在します。徐々に覚えていきましょう。