Adding assig4
This commit is contained in:
36
4/ClassLibraryProjects/ShowCase/Program.cs
Normal file
36
4/ClassLibraryProjects/ShowCase/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using UtilityLibraries;
|
||||
|
||||
int row = 0;
|
||||
|
||||
do
|
||||
{
|
||||
if (row == 0 || row >= 25)
|
||||
{
|
||||
ResetConsole();
|
||||
}
|
||||
|
||||
string? input = Console.ReadLine();
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Console.WriteLine($"Input: {input} {"Begins with uppercase? ",30}: {input.StartsWithUpper()}");
|
||||
Console.WriteLine();
|
||||
row += 3;
|
||||
}
|
||||
while (true);
|
||||
|
||||
return;
|
||||
|
||||
void ResetConsole()
|
||||
{
|
||||
if (Console.IsOutputRedirected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Console.Clear();
|
||||
Console.WriteLine("\nPress <Enter> only to exit; otherwise, enter a string and press <Enter>:\n");
|
||||
row = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user