Re: [问题] C#的一个List和Array的问题

楼主: AmosYang (泛用人型编码器)   2015-01-07 00:05:57
※ 引述《littleshan (我正在想要换什么)》之铭言:
: ※ 引述《jamod (jasper)》之铭言:
: : 应该是有关内存的问题,但上网找了一些说明,还是不是很了解
: 如果你研究过 C++ 的 l-value / r-value / reference
: 再看到这个现象会比较容易理解
: C# 稍微牺牲了一点弹性
: 但加强了内存的安全 (不会有 dangling reference)
补充几个讨论串
* http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil
* http://stackoverflow.com/questions/6339602/why-doesnt-c-sharp-support-the-return-of-references
* http://stackoverflow.com/questions/3284767/can-i-use-a-reference-inside-a-c-sharp-function-like-c/
* http://ericlippert.com/2011/06/23/ref-returns-and-ref-locals/
讲到 C# 语言实务经验, Eric Lippert 的 blog 不只是值得一读
,而且是绝对不能错过的重要资料
(如果能问出让 Eric Lippert 乱入来回答的问题,就有如在格斗
游戏中满足了让豪鬼乱入的条件,是踏入 C#/.NET/CLR 八奇思
考领域的第一步 :D )

Links booklink

Contact Us: admin [ a t ] ucptt.com