Question: what is the difference between constant and readonly variables in c# with example?
Answer: Difference between const and readonly const fields has to be initialized while declaration only, while readonly fields can be initialized at declaration or in the constructor. const variables can declared in methods ,while readonly fields cannot be declared in methods.