hakan648
یک شنبه 21 خرداد 1391, 00:30 صبح
سلام
If you don’t find an existing event data class that can hold your event data, you’ll need to implement
your own custom event data class that derives from EventArgs or one of its subclasses and exposes
properties that correspond to your event data.
سوال من در مورد متنی که در بالا نوشته شده هست .
یعنی حتما باید کلاس Eventargs ما از کلاس EventArgs مشتق شده باشه ؟ ( منظورم کلاسی هست که بوسیله اون ، دیتاهای ایونت رو به متد مربوطه پاس میدیم هست )
یک کلاسی نوشتم که از این کلاس مشتق نشده بود و مشکلی هم نداشت .
لطفا راهنمایی بفرمایید که چرا در این کتاب ، مشتق شدن از کلاس EventArgs اجباری هست !؟
البته این کتاب برای dotNet2 نوشته شده - امکان داره که در 4 این اجبار از بین رفته باشه ؟
با تشکر
If you don’t find an existing event data class that can hold your event data, you’ll need to implement
your own custom event data class that derives from EventArgs or one of its subclasses and exposes
properties that correspond to your event data.
سوال من در مورد متنی که در بالا نوشته شده هست .
یعنی حتما باید کلاس Eventargs ما از کلاس EventArgs مشتق شده باشه ؟ ( منظورم کلاسی هست که بوسیله اون ، دیتاهای ایونت رو به متد مربوطه پاس میدیم هست )
یک کلاسی نوشتم که از این کلاس مشتق نشده بود و مشکلی هم نداشت .
لطفا راهنمایی بفرمایید که چرا در این کتاب ، مشتق شدن از کلاس EventArgs اجباری هست !؟
البته این کتاب برای dotNet2 نوشته شده - امکان داره که در 4 این اجبار از بین رفته باشه ؟
با تشکر