dotnet · dotnet/InvalidOperationException
InvalidOperationException
InvalidOperationException
Thrown when a method call is invalid for the object's current state. Common examples: calling MoveNext() on a disposed enumerator, modifying a collection while iterating it, or accessing a UI control from a non-UI thread.