This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2023_Stanislav_Mykhailenko/Lesson_5/Task_1/Classes/UserInput.cs

18 lines
365 B
C#
Raw Normal View History

2023-04-09 20:58:13 +00:00
namespace Lesson5.Classes;
using Lesson5.Interfaces;
public class UserInput : IUserInput
{
public static string AskStringInput(string prompt)
{
while (true)
{
Console.Write(prompt);
string? input = Console.ReadLine();
if (!string.IsNullOrEmpty(input))
return input;
}
}
}