E
Emily
Hi,
I have the following code and an unhandled exception.
Code:
UnitInventory inventory;
foreach (object obj in list) //debugger points to list where
exception occurs
{
inventory = (UnitInventory)obj;
Console.WriteLine(inventory);
}
Error message:
"An unhandled exception of type 'System.InvalidOperationException'
occurred in mscorlib.dll
Additional information: Specified IComparer threw an exception."
Any suggestion on how to get rid of the error? Thanks!
I have the following code and an unhandled exception.
Code:
UnitInventory inventory;
foreach (object obj in list) //debugger points to list where
exception occurs
{
inventory = (UnitInventory)obj;
Console.WriteLine(inventory);
}
Error message:
"An unhandled exception of type 'System.InvalidOperationException'
occurred in mscorlib.dll
Additional information: Specified IComparer threw an exception."
Any suggestion on how to get rid of the error? Thanks!