C#: What's the difference between the params keyword and giving a default value

52 Views Asked by At

The title pretty much says it all, but what I would like to know is whether there is an advantage to using one or the other?

For example:

public void MyMethod(params string[] list) { }

public void MyMethod(string[] list = new string[] { }) { }

How are those different?

0

There are 0 best solutions below