77_105_114_111
77_105_114_111
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ PRNG
I understand, thanks
3 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
thank you
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
I made a error, It's working now 🙂
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
but it does not work with array
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
This removes case sensitive letters for a string variable Text1.Equals(Tesla, StringComparison.OrdinalIgnoreCase)
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
ok I'll read through the link, thanks
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
Even this way is not %100 because if the user enters just one capital letter it wont work
14 replies
CC#
Created by 77_105_114_111 on 1/16/2025 in #help
✅ Ignore case sensitive string in array.
string[] question1 = { "Tesla", "Mercedes"};


try
{

Console.WriteLine("Welcome to the C# quiz.");

//Question 1.
Console.WriteLine("1. Enter cars name: ");
Text1 = Console.ReadLine();



if (Text1 == question1[0].ToLower() || Text1 == question1[0].ToUpper())
{
Console.WriteLine("Correct answer");
Score++;
}
string[] question1 = { "Tesla", "Mercedes"};


try
{

Console.WriteLine("Welcome to the C# quiz.");

//Question 1.
Console.WriteLine("1. Enter cars name: ");
Text1 = Console.ReadLine();



if (Text1 == question1[0].ToLower() || Text1 == question1[0].ToUpper())
{
Console.WriteLine("Correct answer");
Score++;
}
14 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
Thanks again for the support, cheers.
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
I created 2 custom calculator apps one with if statements & Try Catch. The other with switch case & TryParse(), 3 kilo bytes difference, not much but then again if I were to use the TryParse() with a much bigger app then it adds up
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
Ok I understand instead of case: 1 we can change it to case "1":
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
so instead of case 1: case: 2 we can have case stringName: case stringName2?
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
if the user input is a string data type then it does not work with switch case because switch case only excepts numeric data. I guess the only good time to use TryParse() is when working with if else statements
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
seems like a bit of a hassle trying to get TryParse() to work with user input & switch case
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
ushort is 2 bytes & uint is 4 bytes plus I don't need that many numbers for the option menu
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
it's working now, thank you
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
updated ushort option; to ushort option = 0;
50 replies