We have an object that performs some useful work. He needs to pass a set of parameters, options. Suppose that the number of parameters can go up to 10. What is more correct and beautiful - transfer parameters in the usual way, or create a class of options to store these parameters and transfer it?
For example:
internal class Options { public bool Debug { get; set; } public bool Verbose { get; set; } public bool StopOnErrors { get; set; } public bool SkipExisting { get; set; } public bool CheckOnly { get; set; } public bool Pause { get; set; } public char FieldDelimiter { get; set; } public char ListDelimiter { get; set; } public Options() { Debug = false; Verbose = true; CheckOnly = false; StopOnErrors = true; SkipExisting = false; Pause = false; FieldDelimiter = ','; ListDelimiter = ';'; } }