InterviewSolution
Saved Bookmarks
| 1. |
Does C# Support A Variable Number Of Arguments? |
|
Answer» Yes, using the PARAMS keyword. The arguments are specified as a list of arguments of a SPECIFIC TYPE, e.g. INT. For ultimate flexibility, the type can be object. The standard example of a method which USES this approach is System.Console.WriteLine(). Yes, using the params keyword. The arguments are specified as a list of arguments of a specific type, e.g. int. For ultimate flexibility, the type can be object. The standard example of a method which uses this approach is System.Console.WriteLine(). |
|