Why do I get a syntax error when trying to declare a variable called checked?

The word checked is a keyword in C#.

Showing Answers 1 - 10 of 10 Answers

cmakarla

  • Oct 4th, 2007
 

Checked and UnChecked is keyword in C# used to control the overflow-checking contex for integral type arithemetic operations and conversions. it can be used as an operator or a statement.
 

  Was this answer useful?  Yes

Elean0r

  • May 23rd, 2011
 

checked is a keyword in c#, which causes designated expressions to be checked for arithmetic overflow.
It may be used in one of two ways:
1) block - checked {} , where the block of statements enclosed in curly braces contains the statements to be checked
2) single expression - check(), where the expression to be checked is contained within the parentheses

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions