The final advantage of using const over readonly is performance: Known constant values can generate slightly more efficient code than the variable accesses necessary for readonly values.

 
  • 使用const而不是readonly的最后一点优势就是性能:使用已知常量值的代码效率要比访问readonly值的代码效率稍好一点。
今日热词
目录 附录 查词历史