.NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library
by Brad Abrams
Description
[Note: System.InvalidOperationException is typically thrown when the state of one or more objects determines whether an operation can be performed. For example, when initially enumerating over a set of objects, if the enumerator has not been positioned over the first element via a call to System.Collections.IEnumerator.MoveNext, the system throws a System.InvalidOperationException exception when System.Collections.IEnumerator.Current is accessed. The System.InvalidOperationException exception should not be thrown for errors caused by invalid arguments. For invalid argument errors, throw System.ArgumentException or one of its derived types, such as System.ArgumentNullException or System.ArgumentOutOfRangeException. The ldflda IL instruction ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access