What I mean is instead of going
using System.Text.RegularExpressions;
[...]
Regex.IsMatch(string, pattern, RegexOptions.IgnoreCase);
it’s also possible to do
System.Text.RegularExpressions.Regex.IsMatch(string, pattern, RegexOptions.IgnoreCase);
Is there any benefit to either option besides readability?
>Solution :
It gets compiled into the same thing, but:
- Code is easier to read
- Less code to type
- Developer can quickly see what usings are used in class file