Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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
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);
Add a comment
Use
Byte[] bytes = Convert.FromBase64String(myString);
Look into encoding, but it might be as simple as
YourString = Encoding.ASCII.GetBytes( YourByteArrayString );
If the byte array is an UTF encoded byte array it can be converted using
UTF8Encoding encoder = new UTF8Encoding(); encoder.GetString(bytes);
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.