I created this Annotation class
This example might not make sense because It'll always throw an exception but I'm still using it as I am just trying to explain what my question is.
My annotation never gets called for some reasons any solutions?
public class AuthenticationRequired : System.Attribute
{
public AuthenticationRequired()
{
// My break point never gets hit why?
throw new Exception("Throw this to see if annotation works or not");
}
}
[AuthenticationRequired]
private void Window_Loaded(object sender, RoutedEventArgs e)
{
// My break point get here
}