Re: How to Convert byte[] to String ? {simple request}
From: Morten Wennevik (MortenWennevik_at_hotmail.com)
Date: 06/03/04
- Next message: Mike: "VB or C#"
- Previous message: Daniel Pratt: "Re: csc (C# Compiler) bug"
- In reply to: Auburnate: "How to Convert byte[] to String ? {simple request}"
- Next in thread: Jon Skeet [C# MVP]: "Re: How to Convert byte[] to String ? {simple request}"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 03 Jun 2004 19:27:26 +0200
Hi Nate,
As Patrick said, the bytes need to be filtered through some encoding before they would make sense. ASCII, Unicode, UTF-8, etc. Reading a string as a set of ascii characters would cause a mess if the bytes were unicode encoded.
The Encoding classes have a GetString method you can use.
Happy coding!
Morten Wennevik [C# MVP]
- Next message: Mike: "VB or C#"
- Previous message: Daniel Pratt: "Re: csc (C# Compiler) bug"
- In reply to: Auburnate: "How to Convert byte[] to String ? {simple request}"
- Next in thread: Jon Skeet [C# MVP]: "Re: How to Convert byte[] to String ? {simple request}"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|