Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9763

C#で自身のクラス名や関数名を取得する

$
0
0
実際のクラス名・メソッド名を使用して取得する場合 nameof(クラス名); クラス名・メソッド名を使用せずに取得する場合 GetType().Namespace; // ネームスペース取得 GetType().Name; // クラス名取得 System.Reflection.MethodBase.GetCurrentMethod().Name; // メソッド名取得

Viewing all articles
Browse latest Browse all 9763

Trending Articles