Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does C#Winform save the contents of a text box locally in the form of a string instead of a database, and convert it into binary when saving? It's garbled anyway.
How does C#Winform save the contents of a text box locally in the form of a string instead of a database, and convert it into binary when saving? It's garbled anyway.
It's too simple. Why do you ask? Encoding.ascii.getbytes (text box content), convert the text into byte type, and then save the text stream. If it is garbled, try to convert it to ASCII first, and then to utf8. It's probably garbled if it's preserved.