Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Named-parameters/C-sharp/named-parameters.cs
Normal file
20
Task/Named-parameters/C-sharp/named-parameters.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
|
||||
namespace NamedParams
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void AddWidget(string parent, float x = 0, float y = 0, string text = "Default")
|
||||
{
|
||||
Console.WriteLine("parent = {0}, x = {1}, y = {2}, text = {3}", parent, x, y, text);
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
AddWidget("root", 320, 240, "First");
|
||||
AddWidget("root", text: "Origin");
|
||||
AddWidget("root", 500);
|
||||
AddWidget("root", text: "Footer", y: 400);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue