fenri's diary

基本的には勉強し始めたC#のメモ。後は140字で収まらない駄文。

Delegate

非同期の実装

Delegateの基本 // Delegate_Abcという名のデリゲート型を定義 private delegate void Delegate_Abc(int a); void main () { // デリゲートに関数を登録 Delegate_Abc abc = new Delegate_Abc(ABC_Method); // デリゲートを介して関数を呼び出し a(256); } /…

BeginInvoke

// デリゲート型の宣言 public delegate string AsyncMethodCaller(int targetCount, out int executeCount); // デリゲート型の変数に関数を登録 AsyncMethodCaller caller = someExec; // 非同期処理後の動作を設定 AsyncCallback callback = new AsyncCal…