Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Use of Checked and UnChecked operators?

Answers were Sorted based on User's Feedback



Use of Checked and UnChecked operators?..

Answer / jackir

when value of a datatype excided its limitaion then its
call overflow to avoid this problem we use ckecked and
unchecked
syntax
return unchecked(x+y);
return checked(x+y);

Is This Answer Correct ?    9 Yes 0 No

Use of Checked and UnChecked operators?..

Answer / 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

More C Sharp Interview Questions

Can list contain duplicates c#?

0 Answers  


i have a string aabccefsdss.how can i get the string abcefsd. or write the fallowing string with only character occurrence of once .

1 Answers  


What is private readonly in c#?

0 Answers  


How do I do a case-insensitive string comparison?

0 Answers  


What do you mean by winforms in c#?

0 Answers  


How can you prevent escaping on backslashes in C# with string definitions?

0 Answers   Siebel,


what is object-oriented programming (oop) language?

0 Answers  


what is unit testing

2 Answers  


What is the difference between console application and windows application?

0 Answers  


When should we use delegates in c#?

0 Answers  


How to call a function when a class implements 2 interfaces and function is present in both interfaces?

2 Answers  


How many variables do you need?

0 Answers  


Categories