Under what situations would this code error out with System.StackOverflowException?
Accounts.Sort((x, y) => string.Compare(x.AccountId, y.AccountId));
Update:
the property is written as:
public string AccountId
{
get { return _accountId; }
set { _accountId = value; }
}
Nothing special going on at all. Sort is not overridden either.
Look at the callstack and you will see which function is executed over and over again. If this is not possible (because it is running inside a production environment for example), give more info.
about what the called properties call, where this function is called, etc