What is the difference between a C# Reference and a Pointer?

后端 未结 10 1861
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 21:45

I do not quite understand the difference between a C# reference and a pointer. They both point to a place in memory don\'t they? The only difference I can figure out is that

10条回答
  •  遥遥无期
    2020-11-28 22:25

    A reference is an "abstract" pointer: you can't do arithmetic with a reference and you can't play any low-level tricks with its value.

提交回复
热议问题