本当にヤバイ状況だよ! 東シナ海でイランのタンカーと香港籍の貨物船が衝突 ↓ 当初 日本の危機対応協力を中国側が拒否! ↓ 結果 日本のEEZまで漂流し沈没 ↓ 原油流出量はこの35年間で最悪 ↓ 日本国内での報道ほとんど無 ↓… https://t.co/rnNYUNinuG
delegate string DelegateName(int arg); class Concrete { private int number = 0; public Concrete(int number) { this.number = number; } public string Method(int arg) { int mult = number * arg; Debug.WriteLine(mult); return mult.ToString(); } } static void Main(string[] args) { DelegateName d; d = new DelegateName(new Concrete(1).Method); d += new DelegateName(new Concrete(100).Method); d += new Conc
はじめに DelegateとEventって何が違うの? だとか、 ラムダ式ってどうやって記述するの? という状態なので、 今回は勉強がてら、デリゲートについてまとめてみた記事です。 デリゲートとは そもそもデリゲートとは何かと言えば、 デリゲートは日本語では「委譲」と訳されることが多い。委譲という言葉が分かりにくいと思うなら、代表者と考えてもよい。何かの処理を実行させたいときに、処理機能を持つメソッドを直接呼び出すのではなく、代表者に処理を求めるのである。代表者は処理機能は持っていないが、それを処理できる適切なメソッドを知っており、そのメソッドに処理要求を渡す。 との事。もっと簡潔に言うのであれば、 ざっくり言うと、デリゲートとは関数を入れられる変数です。 [C#] デリゲート(delegate)とはなんぞや – gomokulog みたいな感じです。 デリゲートの使い道としてよくあるのが
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く