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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pre-jit?

537


What are different types of jit ?

589


Explain an assembly?

569


Explain jagged array in vb.net?

562


What is datatype conversion?

548






What is the difference between import system.data.sqlclient and system.data.oledb?

502


Explain the difference between web.config and machine.config and where it will be ?

497


Thank you for replying to my Question regarding Barcodes in VB.net. My next question is that how to use Barcode Fonts in VB.net I need a small code to Generate Barcodes in VB.net from a string of Values. This is the only problem i am left with in my project. Any body can help me please.

2037


What are the differences between c# and visual basic.net?

527


Is it necessary to have SQL server installed in your computer in order to create a service based database in vb.net?

1859


what is difference between namespace and assembly?

530


Explain about garbage collection?

577


Explain managed code?

530


I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com

2210


What does assert() method do In VB.NET

530