Hi folks,
I'm having a problem here I can't solve without your expertise
I have made a Sort-routine which sorts users. This is it's code:
EntityComparer<UserEntity> comparerToUse = new EntityComparer<UserEntity>((Comparison<UserEntity>)delegate(UserEntity x, UserEntity y)
{
UserEntity[] users = new UserEntity[] { x, y };
string[] userFullNames = new string[2];
for (int i = 0; i < users.Length; i++)
{
userFullNames[i] = this.GetFullName(users[i]);
}
return String.Compare(userFullNames[0], userFullNames[1], true);
});
this.users.Sort("User", this.sortDirection, comparerToUse);
So in this case I would like to sort the existing collection containing Users with properties from that User. The problem is that whatever I try, I never reach the code in the delegate (when debugging) which is with the custom comparer.
Does anyone know what might be wrong.