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
I am not sure for c#, however for c++/c it depends on what you are passing. If you are passing a base type (int, float, double, char).... then passing by value is faster then passing by reference (because function call are optimized for this. If you are passing something larger, a large class, an array, long string... then passing by reference is much, much faster because if you are doing an int[100000] then the processor will have to allocate a 100000 x 32/64 (depending on architecture) chunk, and then copy all of the values over, that takes a lot of time. Whereas by reference just passes a pointer
C# abstracts most of this away, so I do not know what it does, but I think that what applies to c++/c in terms of efficiency can usually apply to c#.