CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS MICROSOFT C# DETAILS
Question :
What is true about readonly variable in C# code?


Category C# Interview Questions
Rating (5.0) By 16 users
Added on 7/28/2006
Views 809
Rate it!
Answers:

B is the right choice. since readonly field can only be initialized at the time of construction of the object. that means if you wanna initialize the readonly property that intialize it inside the constructor.



readOnly --> should be initialzed at declaration time or in class contructor().
But initialization should be happened before end of the class contructor execution.



 Posted by: Murugesan Bakthavachalam    

Contact Murugesan Bakthavachalam  Contact Murugesan Bakthavachalam

readonly variable is unmodifiable outside the scope of construction and declaration.



 Posted by: shilpa mishra    

Contact shilpa mishra  Contact shilpa mishra


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
A local C# variable declared in the for loop is in scope in

View Answer
Which of the following is the correct way to instantiate an object in C#:

View Answer
The field variables in a class or a struct in C# are by default given a value of zero

View Answer
All the variables local to a method in C# must be initialized before they can be used

View Answer
Difference between shadow and override?


View Answer
What happens when a C# project has more than 1 Main methods

View Answer
Which of the following explicit type conversion is achieved with out loosing the original data value

View Answer
Which of these operator has the Highest Precedence

View Answer
How do you determine the size required by a Value type on the stack

View Answer
How do you check whether an Object is compatible with Specific Type

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C# Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/8996/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.72