How do I convert a String to a byte in .NET (C#) without manually specifying a specific encoding?
I'm going to encrypt the string. I can encrypt it without converting, but I'd still like to know why encoding comes to play here.
Also, why should encoding be taken into consideration? Can't I simply get what bytes the string has been stored in? Why is there a dependency on character encodings?

Sagar Pandurang KapRank #606 · 4K reputationPosted Mar 14, 2018, 9:58 PM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Mar 14, 2018, 10:45 PM EDT