.NET Questions

Q:

Does .NET support multiple inheritance?

Answer

.NET does not support multiple inheritance directly because in .NET, a class cannot inherit from more than one class. .NET supports multiple inheritance through interfaces.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1899
Q:

How to create a Delegate?

Answer

public delegate void Del<T>(T item);


Del<int> d1 = new Del<int>(Notify);

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1891
Q:

Explain how garbage collection manages the reclamation of unused memory?

Answer

The garbage collector assumes that all objects in the managed heap are garbage. It starts walking the roots and builds a graph of all objects reachable from the roots recursively. It stops when it attempts to add an object to the graph that it previously added. The graph contains the set of all objects that are reachable from the application's roots. Any object/s that is not in the graph is not accessible by the application, and is considered garbage. Collection only occurs when the heap is full. In such a case, each and every garbage object calls the Finalize method and reclaims the unused memory

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 1835
Q:

Explain how garbage collection deals with circular referrences?

Answer

The .Net runtime knows about all the references between the objects. It can identify all the circular references that are reachable from the root and hence finalize them to free them all at once if and when needed

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1804
Q:

What is assembly manifest?

Answer

Assembly Manifest is a file that contains data that describes how the elements present inside an assembly are connected to each other. The assembly manifest contains assembly metadata to define the scope of the assembly and resolve references to resources and classes.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1800
Q:

How to set breakpoints?

Answer

Setting up the break points:



  1.  Go to the line where you need to mark the breakpoint.

  2.  Click with mouse on left corner margin of that line.

  3.  Another way is to press F9

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1783
Q:

What is a delegate?

Answer

A delegate declares a ref type that references a named of anonymous method. Delegates are secure and type-safe. Consider them as type safe function pointers.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1759
Q:

Explain how to configure Trace switches in the application’s .config file.?

Answer

switches are configured using the .config file


<system.diagnostics>


<switches>


<add name="MyTraceSwitch" value="1" />


<add name="TraceSwitch2" value="1" />


</switches>


</system.diagnostics>


both are on.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1739