Thanks for Daniel's quick response!
Hi Paul,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to create your own attribute
and apply it to certain classes. And you need the attribute cannot be
applied to classes other than those inherited from
System.Windows.Form.Control. If there is any misunderstanding, please feel
free to let me know.
I agree with Daniel's suggestion that we cannot check this constraint in
.NET framework. attributes can be applied to any class definitions. So I
think using fxcop might be the best workaround. FxCop can be downloaded
from the following link:
http://www.gotdotnet.com/team/fxcop/
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."