حذف تعريف خاصية مع انعكاس

يتم تعريف خاصية استخدام TypeBuilder.DefinePropertyالأسلوب. DefineProperty إرجاع a PropertyBuilder. The DefineProperty أسلوب يتطلب the caller إلى specify the اسم خاصية, the توقيع of the خاصية, the السمات الخاصيه (using the PropertyAttributes قائمة تعداد), و the backing حقل.

The PropertyBuilder فئة allows the caller إلى specify the getter أسلوب, the setter أسلوب, و أي غير ذلك وظائف.

The القيمة افتراضية of the خاصية can be التعيين using PropertyBuilder.SetConstant.

راجع أيضًا:

موارد أخرى

استخدام الانعكاس حذف