I have this code and it doesn't work for some reason. I don't understand it. What is wrong?
byte dog = (byte)2*byte.Parse("2");
I get this exception in LinqPad: "Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)."
Also what is the right way to write this code? Thanks.