In a recent project I decided to use variable arguments to a function – the first time I’ve needed to. If you haven’t worked with them before, you probably don’t know the point of them. They’re easy to use though. Every so often you may need to pass a number of arguments to a function, but it may be hard to predict how many. An example is the String.Format() method: String.Format("{0:d} - {1} ({2})", DateTime.Now, msg, severity);
You could pass more or less arguments depending on what you are formatting. If you’ve ever given it a thought, though, you’d...