Use of Checked and UnChecked operators?

Answer Posted / hridya

In a checked context, if the operation is a constant
expression a compile-time error occurs. Otherwise, when the
operation is performed at run-time, a
System.OverflowException is thrown.

In an unchecked context, the result is truncated by
discarding any high-order bits that do not fit in the
destination type.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# and c sharp same?

489


How to open a new form on button click in Windows forms?

528


What is inheritance c#?

491


What is application object in c#?

508


Explain how to add controls dynamically to the form using c#.net.

558






What is the difference between hashtable and dictionary in c#?

478


Can struct be static in c#?

514


What is the function of the not null constraint?

498


Why do we need static in c#?

513


What is difference between private and static constructor?

470


What is readline library?

504


Define method overloading in c#?

592


Is it possible to have a static indexer in c#? Allowed in c#.

531


Define a strong name in .net?

546


Explain About DTS package

578