+ 3
What i have to write before? * = Console.ReadLine(); *
Fill in the blanks to ask for user input in the method and return the value entered using output parameters. static void Ask( out string name) { = Console.ReadLine(); } static void Main(string[] args) { string nm; Ask( out nm); }
5 odpowiedzi
+ 1
static void Ask(out string name)
{
name = Console.ReadLine();
}
You don't return anything. The out parameter acts similar to a pointer, meaning that if you modify an out variable in your method, the change will persist since you modified the out variable you overloaded directly.
0
out
name
out
0
Fill in the blank to define a method that does not return a value.
static
Register(string name, string mail)
{
//some code
}
0
Rearrange the code to declare a method that returns the square of its argument.
0
Rearrange the code to declare a method that returns the square of its argument.