---
title: "What are the difference between const and readonly?"  
description: "What are the difference between const and readonly?"  
author: "Sumit Kesarwani"  
published: 2014-01-25  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/1876/what-are-the-difference-between-const-and-readonly  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What are the difference between const and readonly?

A const can not be static, while readonly can be static.

A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.

A const’s value is evaluated at design time, while a readonly’s value is evaluated at runtime.

## Answers

### Answer by Sumit Kesarwani

A const can not be static, while readonly can be static.

A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.

A const’s value is evaluated at design time, while a readonly’s value is evaluated at runtime.


---

Original Source: https://www.mindstick.com/interview/1876/what-are-the-difference-between-const-and-readonly

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
