Articles → .NET DESIGN PATTERN → Tester-Doer pattern in .net

Tester-Doer pattern in .net






Potential exception throwing code




List<string> values = someClass.GetAllValues();
Console.WriteLine(values.Count);







Tester-doer pattern










List<string> values = someClass.GetAllValues();
if (values != null) // Tester
{
    Console.WriteLine(values.Count); // Doer
}





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, October 14, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250