Does C# use the -> pointer notation?

前端 未结 4 893
南旧
南旧 2020-12-11 03:02

I am trying to learn C# and I am familiar with the C++ struct pointing notation ->. I was curious if that crossed over into C#.

Example:



        
4条回答
  •  攒了一身酷
    2020-12-11 03:51

    While C# has pointers behind the scenes they are totally hidden from the user. You can't get at a pointer to dereference it. You only have the dot notation to access something inside something, whether the original is a pointer or not is hidden from you.

    The only way you are even aware of pointers is things that pass by reference rather than passing by value.

提交回复
热议问题