Performance of pass by value vs. pass by reference in C# .NET

后端 未结 7 1629
遇见更好的自我
遇见更好的自我 2020-12-05 18:27

I\'ve created a lightweight class with a constructor that takes around 10 parameters. The class does not change the parameter values; it just stores the values locally via

7条回答
  •  半阙折子戏
    2020-12-05 19:10

    No. Passing parameters by reference adds overhead, so it would only decrease the performance.

提交回复
热议问题