Inb4 fucking newfag

what am i doing wrong

Other urls found in this thread:

gyazo.com/80632a382555cadeb26f03b87e53b120
twitter.com/NSFWRedditVideo

Everything

>C#
There's your problem.

fucking newfag
OP can't inb4.

it can't find TextBox1?

We can't really get anything from that... What is the compiler error(s)

You're trying to assign an int to a string. Declare price's type as an integer.

>what am i doing wrong
price should be an int, not a string.

you see those red zigzags? that is what is wrong.

>what am i doing wrong
Existing.

this

gyazo.com/80632a382555cadeb26f03b87e53b120

this is full error box. made it an integer

The result of your operation is a double which you're trying to store in an int

Either save the operation on a variable of double type or cast the result to int

I don't even know C# but holy fuck.

0.8 is a double. price * 0.8 implicitly casts price to a double (or else it wouldnt make sense). Right side is an int, left side is a double and there is no explicit cast. Change the type, cast explicitly, or refactor (please refactor)

Protip, dont use floats to represent money, instead store the prices as the lowest denom as an int/long.

Not sure what you did wrong, but why not use the dark theme? It's better for your eyes and it's power saver.

>dont use floats to represent money, instead store the prices as the lowest denom as an int/long.
Terrible pajeet advice, use Decimal for money in C#

you are trying to implicitly convert double to int which is disallowed. are you missing a cast? do you even understand english? can you read?

/thread

>trying to put a int into a string

>eventargs e is unused
>sender is unused
>using variable textbox1.txt that is undefined anywhere unless its a global variable