Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference b/w Readonly Variable and Constant
Variable?

Answers were Sorted based on User's Feedback



What is the difference b/w Readonly Variable and Constant Variable?..

Answer / madhav rao. a from polaris

Read Onely and Consat Varribles are same but Read onely
Variables you can assign the Values at Runtime

Ex. Date

Is This Answer Correct ?    23 Yes 4 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / kamalakannan.a

Read only variable value is changed at runtime.

but Constant variable value doesn't change.

Is This Answer Correct ?    15 Yes 4 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / arun

constants are dealt with at compile-time, while static
readonly fields are set at the time they are evaluated at
run-time.
the constant value will need to be recompiled if the
constant value changes. Libraries referencing a static
readonly field will reference the field and not the value,
thus they will pick up any change in the field without the
need for recompilation
constants will only support value types plus the
special .NET ones string and null while Static readonly
fields are able to hold reference types too.
So, constants should be used when it is very unlikely that
the value will ever change, or if no external apps/libs
will be using the constant. Static readonly fields should
be used when run-time calculation is required, or if
external consumers are a factor

Is This Answer Correct ?    10 Yes 2 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / niranjan

The readonly keyword differs from the const keyword. A
const field can only be initialized at the declaration of
the field. A readonly field can be initialized either at
the declaration or in a constructor. Therefore, readonly
fields can have different values depending on the
constructor used. Also, although a const field is a compile-
time constant, the readonly field can be used for run-time
constants, as in this line: public static readonly uint l1
= (uint)DateTime.Now.Ticks;

Is This Answer Correct ?    4 Yes 0 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / satyambabu

variable used to store the data
Read only variable:-
Read only variable means read only but not allow to write
constant:
constant variable specify the constant value.

Is This Answer Correct ?    8 Yes 6 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / cherran

Readonly Variable can be accessed while instantiating the
Class and CONSt - you have to manually code the constant in
each and every project.

Like:
ReadOnly Property age() As Integer
Get
Return 98
End Get

End Property

Is This Answer Correct ?    6 Yes 5 No

What is the difference b/w Readonly Variable and Constant Variable?..

Answer / nishant vishwakarma

A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB.NET Interview Questions

1234 123 12 1 how to design above pic in vb.net?

2 Answers   ABC,


Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate

0 Answers   TCS,


What is sealed class?

0 Answers  


How a base class method is hidden?

0 Answers  


Explain how can we remove handlers at run time?

0 Answers  


Explain the use of new keyword?

0 Answers  


What is late binding?

0 Answers  


What is the top .net class that everything is derived from?

0 Answers  


Explain strong name in .net assembly?

0 Answers  


What do you mean by deserialization?

0 Answers  


How to retrieve images in sql server database through vb.net?

0 Answers  


What is normal jit?

0 Answers  


Categories