Question: C# Language Part A-3: ReadString Create a method called ReadString that will ask the user for a string. Instead of returning the value like in

C# Language

C# Language Part A-3: ReadString Create a method called ReadString that will

Part A-3: ReadString Create a method called ReadString that will ask the user for a string. Instead of returning the value like in ReadInteger, you should use pass by reference to get the string back to the caller. The method should show a prompt, read the user's input, store the input in the ref parameter. If the user does NOT enter a string, show an error message to them, show the prompt again and ask for the user's input. You'll need a loop for this. Do not return until the user enters something. You should use the IsNullOrEmpty or the IsNullOrWhiteSpace methods of the string class to check if the string is empty. NAME RETURNS PARAMETERS COMMENTS ReadString void Show the prompt, read input, store in ref parameter string prompt ref string value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!