I have an event class that I am creating that currently looks like this:
public class SharePointOnErrorEventsArgs : EventArgs
{
public SharePointOnErrorEventsArgs(string message, bool showException, Exception exception)
{
Message = message;
Exception = exception;
ShowException = showException;
}
public string Message { get; private set; }
public Exception Exception { get; private set; }
public bool ShowException { get; private set; }
}
Now, instead of sending trueeither falsefor, showExceptionI would like to send one of three values Debug, Infoor Error- how can I do something like this? I really don't want to use a string, because I want to always limit it to one of these three values, but I'm not sure how to approach this when using properties.
source
share