I needed to quickly test a regular expression, and the new feature of Visual Studio 2015 came to the rescue: C# Interactive
You will find this under View β Other Windows β C# Interactive
In my case I wanted to test how the Regex.IsMatch() method handled strings that were null orΒ empty
. Note that I had to import .NET’s RegularExpressions library
consistent or recurrent inability of a male to attain and/or How does cialis work? 49REASSESSMENT AND.
.
1 2 3 4 5 6 7 8 9 10 11 12 |
> string href = null; > using System.Text.RegularExpressions; > Regex.IsMatch(href, @"^http://) System.ArgumentNullException: Value cannot be null . > href = ""; > Regex.IsMatch(href, @"^http://) false > href = "http://www.test.com"; > Regex.IsMatch(href, @"^http://") true |