Created
March 9, 2016 08:12
-
-
Save vdonchev/76642475177fdc0c0199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public static class Shits | |
| { | |
| public static void Main() | |
| { | |
| var num = 5; | |
| var @double = 5.5; | |
| var @string = "string"; | |
| // Извикване на метода без масив | |
| Printer(num, @double, @string); | |
| Console.WriteLine(new string('-', 25)); | |
| // Извикване на метода с масив | |
| var array = new object[] {num, @double, @string}; | |
| Printer(array); | |
| } | |
| public static void Printer(params object[] itemsToPrint) | |
| { | |
| foreach (var item in itemsToPrint) | |
| { | |
| Console.WriteLine(item); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment