volitelný parametr, C#/Parametr, Visual Studio 2022
This commit is contained in:
parent
ce64517296
commit
b7ad7e658f
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,7 +18,7 @@ namespace Parametr
|
|||||||
|
|
||||||
}
|
}
|
||||||
static void PrintEmployeeDetail(string name, int age, int empid, bool supervisor = false) // <--- toto jsou parametry <--- , supervisor = nadřízený
|
static void PrintEmployeeDetail(string name, int age, int empid, bool supervisor = false) // <--- toto jsou parametry <--- , supervisor = nadřízený
|
||||||
{
|
{ // supervizor je volitelný parametr --> vždy se dává na konec
|
||||||
Console.WriteLine($"Name : {name}, Age : {age}, Employee ID : {empid}, IsSupervizer : {supervisor}");
|
Console.WriteLine($"Name : {name}, Age : {age}, Employee ID : {empid}, IsSupervizer : {supervisor}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user