.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
abhays
satyapriyanayak
SP
ASPEvil
Ashutosh Jha

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Why do we need to call CG.SupressFinalize?

Posted By :Amit Mehra     Posted Date :September 07, 2008    Points :10   Category :.NET Framework 
Requests that the system not call the finalizer method for the specified object.

[C#]
public static void SuppressFinalize(
object obj
);

The method removes obj from the set of objects that require finalization. The obj parameter is required to be the caller of this method.

Objects that implement the IDisposable interface can call this method from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it.

You can also find related Interview Question to Why do we need to call CG.SupressFinalize?  below: 

Can we call a base class method without creating instance?

  
Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

What is the Transport Protocol you use to call a Web Service ?

  
SOAP (Simple Object Access Protocol) is the preferred protocol. (More...)

How do I call a member method and pass a primitive type (Value Type) by reference?

  
Use the ref keyword when declaring the parameter of the method, for example:

public bool GetValue( ref int returnValue );

This will pass the numeric by reference.You can modify the value of returnValue within the body of GetValue and it will persist when the method call returns. (More...)

Can I call a Win32 API function from a C# program?

  
Yes, you can.The .NET Framework provides a set of services called Platform Invoke, also known as PInvoke. Refer to the .NET Framework documentation for examples of using PInvoke services. (More...)

Which method would you call to send an e-mail message and wait for the transmission to complete before proceeding?

  
Select from following answers:

1.MailMessage.Send
2.SmtpClient.Send
3.SmtpClient.SendAsync
4.MailMessage.SendAsync

Correct Answer is:

SmtpClient.Send (More...)

How do you directly call a native function exported from a DLL?

  
[DllImport("user32.dll")]
public static extern int MessageBoxA(int h, string m, string c, int type); (More...)

How can U Call garbage Collector method()?

  

GC.Methodname();

please follow this link for full lenghth details:

http://www.developer.com/net/csharp/article.php/3343191/C-Tip-Forcing-Garbage-Collection-in-NET.htm (More...)

In a Java multithreading program, under what circumstances will you call the yield() method of a thread?

  
1, To give other runnable threads a chance to execute.
2, To start a new thread.
3, To terminate the current thread.
4, To stop the current thread for a specific time.

Answer : 1 (More...)

Is it possible make a call to server side event of any button using javascript?

  
Yes, it's possible. You can use __doPostBack() function to call server side event.
(More...)

How can we call javascript function in page load event?

  
this.button.Attributes.Add("OnClick",return functionname(););
(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend