ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
Difference Between ReadOnly and Constant Variable in 
compile time and Run Time.
 Question Submitted By :: Als.senthur Ganesh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference Between ReadOnly and Constant Variable in compile time and Run Time.
Answer
# 1
readonly variables are can be initilized at compile time
but we can assign values to readonly varialble at once 
through functions or constructors

but in case of constant variables once assign a value we 
can't change value and must assign value to constant 
variables at the time of declarition
 
Is This Answer Correct ?    2 Yes 0 No
Kamlesh Sharma
 
  Re: Difference Between ReadOnly and Constant Variable in compile time and Run Time.
Answer
# 2
I am adding another point to the above answer.

as the constant variable is constant over the class,that 
means,all the objects created for that class have the same 
value.
but in case of readonly variables,we can assign different 
values in the different instances of the class it contains.
 
Is This Answer Correct ?    3 Yes 0 No
Karna
 
 
 
  Re: Difference Between ReadOnly and Constant Variable in compile time and Run Time.
Answer
# 3
readonly is compile time constant.
constant is runtime constant.

constatnt field is used to initialize at the declaration of 
the field.
readonly field is used at the declaration or constructor of 
the field.
 
Is This Answer Correct ?    0 Yes 2 No
Saiish Bhat
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What namespaces are imported by default in ASMX files?  2
How can i include both C# and vb.net classes in same solution?  2
Explain what a diffgram is, and a good use for one? FT1
Can you explain what inheritance is and an example of when you might use it?  3
about view state and how validation controls will be executed on client and server Wipro2
Explain the differences between Server-side and Client-side code? Visual-Soft6
What is the method used to load generated dataset with data on the DataAdapter control ?  3
33) You create English, French, and German versions of your ASP.NET application. You have separate resource files for each language version. You need to deploy the appropriate resource file based on the language settings of the server. What should you do? A . Create an installer and set the Installer.Context property for each version of your application. B . Create an installer that has a launch condition to verify the locale settings. C . Create an installer that has a custom action to install only location-specific files. D . Create an installer that has an MsiConfigureProduct function to install the appropriate version. Syntax-Softtech2
explain about Back ground process control in .net Infronics1
How to kill session? Protech11
How can you assign styles to webforms? Microsoft2
Is There any Third party tools are using in .Net Technologies? Can u Explain? HCL2
Is it necessary to undertsand these events of an ASPX page execute. Explain its importantance? HCL1
What does the "EnableViewState" property do? Why would I want it on or off?  4
Which tools of web site Administartion tool do you use to manage user,roles and rules?  2
You ve defined one page_load event in aspx page and same page_load event in code behind how will prog run?  4
What are Authentication mechanisms in .Net? Accenture5
hai to all. what is the procedure for " web hosting ".If you know please message me at "yoursguna@gmail.com". Thank u...  1
What is Active Directory? What is the namespace for that?  2
Rate yourself in .net and sql database? Satyam1
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com