Readonly keywords in C# are used to declare variables that cannot be changed after they are initialized. Const variables are initialized at compile time and their value can never change. While readonly variables can be initialization at compile-time or runtime.
Table of contents
const and readonly in more detailIL difference between const and readonlySummary of differences between const and readonly in C#How to choose between const and readonlyRemember to recompile projects which reference consts in other projectsYou might also be interested in...Sort: