as i see that in c++ there is heavy use of pointers i got a question...would it be worth instead of passing in C# arguments by value pass them all or almost all as ref?
Printable View
as i see that in c++ there is heavy use of pointers i got a question...would it be worth instead of passing in C# arguments by value pass them all or almost all as ref?
No. In C# all object are passed by reference by default. It only makes sense for parameters of large value structs (e.g. Rectangle). Small value structs shouldn't be passed as ref unless you want to modify them.