When I am debugging my Application, I got lots of InvalidOperationException and NullReferenceException Like this:
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.NullReferenceException' occurred in XGen.Framework.DLL
Does it makes application slower some how?
Edited:
Found where the InvalidOperationException is Happening
public static Value.Locale Get(string value)
{
try
{ return _Items.First(itm => itm.ID.ToUpper() == value.ToUpper() || itm.Name.ToUpper() == value.ToUpper()); }
catch (Exception)
{ return new XGen.Framework.Value.Locale(); }
}
Translated text: The sequence contains no elements match
Should I check if _Items.Count > 0?