How many parameters in C# method are acceptable?
Posted
by
Valentin Heinitz
on Stack Overflow
See other posts from Stack Overflow
or by Valentin Heinitz
Published on 2012-09-14T21:03:47Z
Indexed on
2012/09/14
21:38 UTC
Read the original article
Hit count: 281
I am new to C# and have to maintain a C# Application. Now I'v found a method vaving 32 Parameters (not auto-generated code).
From C/C++ I remember the rule of thumb "4 Parameters". It may be an old-fashioned rule rooting back to old 0x86 compilers, where 4 Parameters could be accomodated in registers (fast) or on stack otherwise.
I am not concerning about performance, but I do have a feeling, that 32 parameters per functions are not easy to maintain even in C#.
Or am I completly not up to date?
What is the rule of thumb for C#?
Thank you for any hint!
© Stack Overflow or respective owner