one: const is a compile-time constant, but readonly is a runtime constant.
two: const can only modify the primitive types, enum types and string types, but readonly has no limits.
For the first point, because of the compile-time constant feature, so natively it’s static and you can’t add the static modifier manually.
eg: static const int value = 100;
For the efficiency of const keyword, after compiled by the compiler, the constants where they are used will be replaced by it’s real value.
For the readonly variable , it’s assigned when in runtime, then it’s value can not be changed.
The so-called can not be changed contains two meanings.
eg:
class Istone { public readonly int age; public Istone(int age) { this.age = age; } } Istone istone = new Istone(20); istone.age = 300; //it’s wrong, can’t assign value again for readonly variable