What does assert() do?

Answers were Sorted based on User's Feedback



What does assert() do?..

Answer / guest

In debug compilation, assert takes in a Boolean condition as
a parameter, and shows the error dialog if the condition is
false. The program proceeds without any interruption if the
condition is true

Is This Answer Correct ?    5 Yes 0 No

What does assert() do?..

Answer / akshay

assert() is mainly used for debugging the code. The expression is given in the brackets and if the expression becomes false the Assertion Failure takes place. Which simply terminates the application giving file name and line number.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Are tuples mutable c#?

0 Answers  


How do you generate documentation from the C# file commented properly with a command-line compiler?

2 Answers  


What are abstract classes in c#?

0 Answers  


How do you serialize in c#?

0 Answers  


What is the value which is accepted by all data types ?

0 Answers   MCN Solutions,






What is meant by collections in c#?

0 Answers  


What is namespace in oops?

0 Answers  


Does a loop recorder have to be removed?

0 Answers  


What is the difference between these statements obj=null and obj.dispose()

4 Answers   Fulcrum Logic,


What is difference between Convert.ToString(variable) and variable.ToString()

4 Answers   Mascon,


How will you get the different language strings?

0 Answers  


What is polymorphism c# example?

0 Answers  


Categories