GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 409 of 436    Print  
what is the use of fixed statement in c#?

  
Total Answers and Comments: 3 Last Update: September 12, 2008     Asked by: musclebai 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 09, 2008 10:50:13   #1  
pratiksha.saxena Member Since: February 2008   Contribution: 1    

RE: what is the use of fixed statement in c#?
Prevents relocation of variable by Garbage Collector.
 
Is this answer useful? Yes | No
April 02, 2008 03:30:34   #2  
Vikas Yadav Member Since: April 2008   Contribution: 15    

RE: what is the use of fixed statement in c#?
The fixed keyword is responsible for the pinning of managed objects(maanged by CLR). Pinning is the act of specifying to the GC that the object in question can’t be moved.Permitted in unsafe context only i.e wwhen u are using pointers in C#.
 
Is this answer useful? Yes | No
September 12, 2008 01:49:05   #3  
asifdcsku Member Since: September 2008   Contribution: 3    

RE: what is the use of fixed statement in c#?
Fixed is used while doing type casting
Fixed ensures that no exception will be thrown even if we are doing a wrong cast.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape