I have a method that I want to send several parameters or one or none
public void CalcBreakpoint(int tolerance, [I want to send several parameters or one or none])
{
//my code
}
for example something I want to call it as CalcBreakpoint(200, "string value1", "string value 2", "String Value 3")
and in other occasions I would call it as CalcBreakpoint(500, object1, object2)
I would like to avoid overloading because 90% of the code is the same.
How to pass several values as parameters in a method? such as
public void CalcBreakpoint(int tolerance, [ONE_PARAMETER])