Articles → .NET DESIGN PATTERN → Tester-Doer Pattern In .Net

Tester-Doer Pattern In .Net






Purpose





Potential Exception Throwing Code




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







Tester-Doer Pattern




  1. Tester → The code test the condition
  2. Doer → The code performs a potentially exception throwing operation.


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