Buy Questpond's video subscriptions on
huge discount
.
Online: 1345
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
C#
>
Loading ...
Can we assign values to read only variables?if yes then how?
Posted by
Hmanjarawala
on 12/2/2011 | Category:
C# Interview questions
| Views: 5499 |
Points: 40
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
yes, we can assign values to read only variables either at a time of declaration or in constructors
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
Suppose you have a DataTable having 100,000 rows a ...
Next > :
In WCF, "wsHttpBinding" uses plain unenc ...
Comments or Responses
Posted by:
Akiii
on: 12/4/2011 |
Points: 10
It would have been better if you showed us one example.
Thank You
Akiii
Posted by:
Rajeev.Shukla
on: 12/5/2011 |
Points: 10
You can assign the value to a readonly variable either when you declare it or in the constructor itself this no where
you can assign the value to a readonly variable.
e.g,
readonly int a=10
or
Class MyClass
{
readonly int a;
public MyClass()
{
a=10;
}
}
Login to post response
More Interview Questions by Hmanjarawala
Latest Interview Questions
In WCF, "wsHttpBinding" uses plain unencrypted texts when tr ...
Why in WCF, the "httpGetEnabled" attribute is essential ?
Difference between Abstract class and interface?
What are User Controls and Custom controls?
You can derive an abstract class from another abstract class. In that ...
What is MERGE statement?
Can you prevent a class from overriding ?
What is BCP ?
More ...