Constant and ReadOnly are two important keywords in C# programming. They are used to declare variables, but the main difference between the two is the types of variables they declare. Constant is used to declare constant variables. Constant variables are values that need to be declared once during declaration before whatever computation they are being declared to do will start. Constant variables are assigned just once and they cannot be changed when the program is being executed. Readonly, on the other hand, is used to declare modifiable variables.
Any variable declared with Readonly can be changed even when the program is being executed. Readonly can be used to declare variables during declaration i.e. before the running of the program, and it can be declared during runtime inside a constructor. Constant variables are represented in a code during declaration and they are static throughout the runtime, while Readonly is not static because it can be changed and they are stored in the memory.