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); }
2/26/2018 6:31:03 PM
Zahid Farook1 Answer
New Answerstatic 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.
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message