With all due respects do not use C#, Dr. Vonn Neumann and good code in the same sentence
Anything after C does not go with my theory of good code or good use of machine resources, I am at heart an assembler kind of guy, that may explain why I quit developing many years ago.
Go no further and check Dr. Donald Knuth Art of Computer Programming series