Can I call a virtual method from a constructor/destructor?



Can I call a virtual method from a constructor/destructor?..

Answer / Priya Gautam

"No, you cannot directly call a virtual method from a constructor or destructor in C#. This is because constructors and destructors are called before or after an object's lifetime, respectively, and virtual methods rely on the runtime type of an object."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Is c# good for games?

1 Answers  


What is difference between string and string builder?

1 Answers  


Explain About stateless and state full web service

1 Answers   Digital GlobalSoft,


what are value types and reference types? where they are stored?

5 Answers   Kanbay,


What is escape character in c#?

1 Answers  


Where is the output of TextWriterTraceListener redirected?

1 Answers  


What is extension method in c# and how to use them?

1 Answers  


What does clr stand for?

1 Answers  


What is the use of tuple in c#?

1 Answers  


How to declares a two-dimensional array in C#?

1 Answers   DELL,


what is IDisposal interface,IComparable,IEquatable,IFormatable

1 Answers   Wipro,


What is the difference between a variable and a literal?

1 Answers  


Categories