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   SiteMap shows list of All Categories in this site.
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 1 No
Saiish Bhat
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Types of objects in ASP? Microsoft5
What is reflection and disadvantages of reflection? Microsoft3
How many rules are there regarding a well formed XML document? a) Nine b) Three c) Six d) Two Syntax-Softtech1
In which form does the dataset store data in it? Verinon-Technology-Solutions3
Finally and dispose methods? Microsoft1
What are different ASP.NET Web Forms with the technology different from though ASP (1.0-3.0)?  1
How many Garbage Collectors are there for one Application or one Page Emphasis1
which is best possible way to add data source to data grid when the data is huge(10 lack recored)how to edit a perticular row Aviva3
is it possible to use web site without web server from remote place? ABC1
Types of objects in ASP ? Microsoft2
What is CTS, CLS and CLR ? TCS4
Describe the difference between a Thread and a Process?  3
Is data can be edited in the Repeater control?  2
What is the main difference between a static page and a dynamic page?  1
What are asynchronous callbacks ? Accenture2
What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False" Phoenix-Technologies9
How many types of validation controls are provided by ASP.NET?  4
How cross page posting is done in Asp.net 2.0?  3
how to add cliet side event to server side? and how to register client script to sever side? wt difference these two PSI-Data-Systems3
what does membership class provide?  1
 
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