11

Is there a C# error exception for a value error? the equivalent of the python "value error" below?

    except ValueError as e:

1 Answer 1

20

Sounds like you probably want ArgumentException, or ArgumentNullException, or ArgumentOutOfRangeException depending on the precise nature. (The latter exceptions are subtypes of the first.)

Sign up to request clarification or add additional context in comments.

2 Comments

@bolt19 Mark the post as an answer then.
says i gotta wait another 4 mins

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.