InvalidOperationException means "the object is in an inappropriate state". That does not describe a parse error.
C# conventions for exceptions are admittedly a bit confusing. There are a handful of very specific scenarios where you're supposed to use a built-in exception (most commonly ArgumentException). For everything else, you want to define your own type.
The state of the stream, such that it's pointing to an illegal character, actually does seem to be invalid though. Maybe this is an overly pedantic argument. I've been writing quite a bit of c# for over a decade and have basically been doing this the whole time. I thought that I knew how to use exceptions, but it seems I do not.
It is forbidden.
https://learn.microsoft.com/en-us/dotnet/standard/exceptions...
> Exception ... None (use a derived class of this exception).
https://learn.microsoft.com/en-us/dotnet/standard/design-gui...
> DO NOT throw System.Exception or System.SystemException.