blunt
blunt
CC#
Created by blunt on 10/29/2024 in #help
✅ variable wont change
switch(vars.AfterMath)
{
//vars is a class i got w all my variables in it
//AfterMath is a variable that stores if you won or no
case true:
vars.money = vars.money + (vars.betAmount * 2);
break;
case false:
vars.money = vars.money - vars.betAmount;
}
switch(vars.AfterMath)
{
//vars is a class i got w all my variables in it
//AfterMath is a variable that stores if you won or no
case true:
vars.money = vars.money + (vars.betAmount * 2);
break;
case false:
vars.money = vars.money - vars.betAmount;
}
then when I go run the program again it says the money is "100$" as I had it at the start and it wasent changing???
40 replies
CC#
Created by blunt on 10/29/2024 in #help
✅ !
what is the logical operator for "not" in C#?
4 replies
CC#
Created by blunt on 10/28/2024 in #help
✅ while loops
while loops keep repeating the same
Console.WriteLine("");
Console.WriteLine("");
over and over without waiting for the user to respond to the
String a = Console.ReadLine();
String a = Console.ReadLine();
anyone know how to solve this?
26 replies
CC#
Created by blunt on 10/28/2024 in #help
✅ method glitch
it said I had an error saying "there is no static Main as and entry point" so I created one but didnt use it. I made a seperate method as my actual code but whenever I ran the code it wouldnt work it just says nothing and then "press any key to close"??
3 replies
CC#
Created by blunt on 10/28/2024 in #help
✅ randoms
does anyone know how to make random numbers but skip count so like 100, 200, 300?
5 replies
CC#
Created by blunt on 10/28/2024 in #help
✅ null or 0
if you declare a variable without giving it a value, is the value null or 0?
4 replies
CC#
Created by blunt on 10/27/2024 in #help
✅ static, public, void
I'm new to C# and I was wondering if I were correct that static means you can use an object or method outside of the file you are coding in, public means you are able to use an object or a method outside of a specific class and void means you will not return anything in the method proceeded?
14 replies
CC#
Created by blunt on 10/27/2024 in #help
✅ static r public?
No description
4 replies
CC#
Created by blunt on 10/27/2024 in #help
✅ new
I've seen people write code like this and I was wondering what it does and what it is called. An example is, apple apple = new apple(); if you know what this is, please help me.
15 replies
CC#
Created by blunt on 10/26/2024 in #help
✅ Methods
I'm new to C# and I was wondering what is a method? Is it like a reusable chunk of code and what can it be applied to?
7 replies