Validating method's parameter is marked as 'only used in precondition'
Recent Resharper builds mark parameters of my validating methods as 'not used'. I was wondering what's the correct approach to take when writing these methods?
Example:
private static void ValidateText(string text)
{
if (text.Length == 0) throw new ArgumentException("text is empty");
}
Please sign in to leave a comment.
Hello Alex,
You can either disable this warning (with comment or through options) or
inline this method. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"