Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions