Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Необязательные аргументы
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { static void Example ( int alpha, int beta=10, int gamma=20) { Console.WriteLine("alpha = {0}, beta = {1}, gamma = {2}", alpha, beta, gamma);} public static void Main(string[] args) { //Your code goes here Console.WriteLine("Необязательные аргументы"); Console.WriteLine("аргумент alpha обязательный, beta и gamma необязаетельные (по умолчанию равны 10 и 20)"); Console.Write("передаем аргументы alpha, beta, gamma: "); Example(1,2,3); Console.Write("передаем аргументы alpha, beta: "); Example(1,2); Console.Write("передаем аргументы alpha: "); Example(1); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Truncate String by Byte
Get year quarter from date
SHA Tester 2.0
dsda
Beadando Simon Szabolcs
Linq FirstOrDefault() null check in c#
Hello World!
Interface with same methods
Floyd’s Warshall Algorithm
числата от 1 до 20
Please log in to post a comment.