Have you ever written a function that looked similar to the following – Passing in an array of a value?
public void UpdateList(string[] list) { //...etc... }
It’s not that uncommon of a method, but did you know you can take it a little further? The params Keyword The params keyword is an interesting modifier to an argument for a method. It allows a user to pass individual values instead of using the array itself.
public void ProcessList(params string[] args) { //...etc... }
//old way still ...
No comments yet, be the first one to post comment.