Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# equivalent of "value error" in Python

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

    except ValueError as e:
like image 517
bolt19 Avatar asked Feb 13 '14 13:02

bolt19


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

Is C language easy?

Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.


1 Answers

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

like image 125
Jon Skeet Avatar answered Sep 20 '22 23:09

Jon Skeet