I have a regex that I am trying to evaluate the value of in the following method:
private void ValidateText()
{
if ((!IsOptional && Text == string.Empty))
{
SetIsValid(false);
}
else
{
if (this.ValidationRegex != null)
{
SetIsValid(this.ValidationRegex.IsMatch(this._text));
}
else
{
SetIsValid(true);
}
}
}
Where:
private Regex ValidationRegex { get; set; }
Now, when it gets to this.ValidationRegex != null I hover over the ValidationRegex value and {NULL} is displayed, so I expect my line to return false and go into the else statement.
Instead, this line returns true and I can't understand why. I have attached a screenshot of this below:

I can't seem to work it out (This is not a threading thing)