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

Can a class be protected in c#?

655


What is xor operation?

697


What is delegates in c#?

669


Explain what are the steps for creating clr trigger?

643


What is instantiating a class?

701


Can we inherit a class with private constructor in c#?

800


What is the use of partial methods?

769


Define assert() method? How does it work?

810


What is expandoobject in c#?

653


What is xamarin used for?

695


What is immutable in C#?

772


What is Delegate and what is it used for ?

764


What is activator c#?

665


What is the difference between a class and an object c#?

660


What are strings in c#?

706