.NET Questions

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 1757
Q:

Explain the process of creating a context menu using the ContextMenu component

Answer

ContextMenu component provides the users with the ability to access some very frequently used commands. Context menu works by right click of mouse. They mainly provide access to commands particular to the control that has been clicked upon.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1726
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 1708
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 1680
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 1598
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 1595
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 1578
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 1571