I need to be able to retrieve the string version of the object.
For ex: Below SearchCriteria
should provide "Search Parameters: FromDate:{0}, ToDate {1}, ..
"
public class SearchCriteria
{
public string FromDate {get;set;}
public string ToDate {get;set;}
public string FromAge {get;set;}
public string ToAge {get;set;}
//other 10 properties
}
But from other threads I read, it is not recommended to use ToString() for long strings due to performance problems. I would like to know if it is ok to use it this way or shall I consider using private method.
EDIT
This string representation is used in the business logic NOT for debugging purpose.