C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
1
Reply
ReadOnly vs Const?
Marcus
14y
7.7k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Const :
A constant member is defined at compile time and cannot be changed at runtime. Constants are declared as a field, using the
const
keyword and must be initialized as they are declared.
ReadOnly:
A read only member is like a constant in that it represents an unchanging value. The difference is that a
readonly
member can be initialized at runtime, in a constructor as well being able to be initialized as they are declared.
Ajitender Vijay
14y
0
Direct CAST vs CType ?
What is Fragmentation and its Types?
Message