Reputation: 10672
I have to get the value from byte string this is the byte string
4W3CfJ//nw1CpeA5NfXx9Ia32JyVmgpRrQCzUabFUvv0fqXYLVeNBT6XKjBehFNGtQ3Sng3Zucqu+RcXUzJ3KA==
now how can I get the value from it
Upvotes: 0
Views: 4877
Reputation: 5651
If the byte array is an UTF encoded byte array it can be converted using
UTF8Encoding encoder = new UTF8Encoding();
encoder.GetString(bytes);
Upvotes: 0
Reputation: 18430
Its an Base64 Encoded string you will need to get back the UnEncoded string like this:
byte[] b = Convert.FromBase64String("your base 64 string==");
originalString = System.Text.Encoding.UTF8.GetString(b);
Upvotes: 6
Reputation: 48169
Look into encoding, but it might be as simple as
YourString = Encoding.ASCII.GetBytes( YourByteArrayString );
Upvotes: 0