Hi there,
IMO, it's cleaner to create an overload that calls the initial method passing in the default value. E.g.:
public static ContactCollection GetContactsByFirstLetterAsCollection(int diaryId)
{
return GetContactsByFirstLetterAsCollection(diaryId, '*');
}
This way, calling code can skip the firstLetterOfSurname param by simply calling something like:
GetContactsByFirstLetterAsCollection(5);
while you can still provide a firstLetterOfSurname by calling the other overload:
GetContactsByFirstLetterAsCollection(5, 's');
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004