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;
|
||||
}
|
||||
14
4/ClassLibraryProjects/ShowCase/ShowCase.csproj
Normal file
14
4/ClassLibraryProjects/ShowCase/ShowCase.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StringLibrary\StringLibrary.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user