byte b=4; byte b1=4,b2=9;
byte b = 4; float x = b; //ok double y=b; //ok
int x = 220; byte b = (byte) x; byte b = (byte) 3 + 4; //the add result is int by default
char c = 'b'; byte b = (byte)c; //b=98 string str = "23"; byte b = System.Byte.Parse(str); //b=23 //to convert a string with caution, use TryParse byte b; string str="23"; if (System.Byte.TryParse(str.Trim(),out b)) { ... }
byte[] arr = { 85, 46, 98, 101, 95 }; string str = System.Text.Encoding.ASCII.GetString(arr); //str = U.be_