Why doesn't C# offer constness akin to C++?

前端 未结 5 1438
悲哀的现实
悲哀的现实 2021-02-07 12:53

References in C# are quite similar to those on C++, except that they are garbage collected.

Why is it then so difficult for the C# compiler to support the following:

5条回答
  •  我寻月下人不归
    2021-02-07 13:31

    Mr. Heljsberg, the designer of the C# language has already answered this question:

    http://www.artima.com/intv/choicesP.html

提交回复
热议问题