If I declare variable in class as const, and create multiple instances of this class, variable will be copied for each instance or not?
1 Answer
No.
const fields are implicitly static.
2 Comments
user2864740
Are they
static or "implicitly like static"?ryanyuyu
Implicitly static, meaning that the compiler makes these variables
static behind the curtain. See Jon Skeet's answer