Guest quantumfusion Posted June 20, 2007 Posted June 20, 2007 what doesEncoding.get_Default().GetBytes(whatever)do ?andBitConverter.GetBytes(num2 + 1)do ?andtext1 = Encoding.get_Default().GetString(buffer1, 5, num4);do ?thanks
high6 Posted July 3, 2007 Posted July 3, 2007 what doesEncoding.get_Default().GetBytes(whatever)do ?andBitConverter.GetBytes(num2 + 1)do ?andtext1 = Encoding.get_Default().GetString(buffer1, 5, num4);do ?thanks1.)puts the bytes of the object provided into an array so like, text.encoding.ascii.GetBytes("Bob")would make a 3 element arraytext.encoding.ascii.GetBytes("Bob"){array[0] = 66 //Barray[1] = 111 //oarray[2] = 98 //b}2.) same thing really.3.)text1 = Encoding.ascii.GetString(array);with an array ofarray{array[0] = 66 //Barray[1] = 111 //oarray[2] = 98 //b}would make text1 = "Bob", it takes the array and converts the bytes to ascii(or w/e u choose) then assembles them into a string based on position.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now