G
Guest
Could someone please tell me how to do the following:
I have a custom Atrribute class that I was hoping to check something in the
constructor and return an exception if not met...kind of like with security
ie:
Sub New(ByVal check As Boolean)
Throw New Exception("No, cant do it")
End Sub
But i dont seem to be able to throw exceptions from the constructor... am i
missing something? How does the SecurityAction.Demand stuff do it?
thanks...
I have a custom Atrribute class that I was hoping to check something in the
constructor and return an exception if not met...kind of like with security
ie:
Sub New(ByVal check As Boolean)
Throw New Exception("No, cant do it")
End Sub
But i dont seem to be able to throw exceptions from the constructor... am i
missing something? How does the SecurityAction.Demand stuff do it?
thanks...