C# Interview Questions for Experienced Professionals - 2

Question: 6

Define Lifetime?

Lifetime refers to the span of time from when the variable is declared to when it is destroyed.

Question: 7

Differentiate the Lifetime with Scope?

A variable may be out of scope without having reached the end of its lifetime.

Question: 8

Does C# have a ‘throws’ clause?

No, unlike Java, C# does not require (or even allow) the developer to specify the exceptions that a method can throw.

Question: 9

Define property?

A property is a member that can appear in a class or in interface. It is an extension of the field. So it is called as smart field.

Question: 10

How are struts different from classes?

Structs are stored on the stack as opposed to the heap.

Structs are value types rather than reference types.

Related Questions