Parameters passed by value, still changed within the function?

This question already has an answer here:

  • Passing Objects By Reference or Value in C# 7 answers
  • C# pass by value/ref? 4 answers

  • The function parameters are two Objects.

    If you change some object property in this function these properties will be changed outside the function.

    But if in your function you do obj = new Umfrage(); and will change properies all properties won't be changed outside.

    链接地址: http://www.djcxy.com/p/21018.html

    上一篇: 在C#中通过值传递引用类型

    下一篇: 通过值传递的参数,仍然在函数内改变?