Interview FAQs


FAQs of level

Objects in object-oriented programming have a lifetime from when they are born (created) to when they die (destroyed or destructed). In the .Net Framework objects  have the following life cycle:

  1. Object creation (new keyword, dynamic instantiation or activation, etc).
  2. The first time around, all static object initializers are called.
  3. The runtime allocates memory for the object in the managed heap.
  4. The object is used by the application. Members (Properties/Methods/Fields) of the object type are called and used to change the object.
  5. If the developer decided to add disposing conditions, then the object is disposed. This happens by coding a using statement or manually calling to the objects Dispose method for IDisposable objects.
  6. If the object has a finalizer, the GC puts the object in the finalization queue.
  7. If the object was put in the finalization queue, the GC will, at an arbitraty moment in time, call the object’s finalizer.
  8. Object is destroyed by marking its memory section in the heap segment as a Free Object.

A breakpoint is a marker in your source code that triggers automatic entry into break mode.
These features are available only in debug builds. If you compile a release build, all breakpoints are ignored. There are several ways to add breakpoints. To add simple breakpoints that break when a line is reached, just left-click on the far left of the line of code, right-click on the line, and select Breakpoint ? Insert Breakpoint; select Debug ? Toggle Breakpoint from the menu; or press F9.
A breakpoint appears as a red circle next to the line of code

The goto statement is a jump statement that controls the execution of the program to another segment of the same program. You create label at anywhere in program then can pass the execution control via the goto statements.

goto <labelName>;


class Program
static void Main(string[] args)
string strEname; //declaring variable
goto jumpon;
strEname ="sid"s place"; //initalizing value
Console.WriteLine(strEname); //printing value of variable

Using this code you can create a null array-
string[] arr = new string[] ();

If we have two classes Baseclass and Childclass, Childclass inherit base class. If we make the object of child class then Baseclass constructor will be call first.

Yes,if we have not override it then it give error. So we must need to override it.

Value and its datatype depend on whatever variable we are changing. 

It is available to derived classes and classes within the same Assembly. 

Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there is no implementation in it. 
To prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it is public by default. They all must be public.
PreviousDisplaying 22 of 25Next
Need Help? Contact Us.

Log in


Forgot password?


New User