If you already have a byte array then you will need to know what type of encoding was used to make it into that byte array.
For example, if the byte array was created like this:
byte[] bytes = Encoding.ASCII.GetBytes(someString);
You will need to turn it back into a string like this:
string someString = Encoding.ASCII.GetString(bytes);
If you can find in the code you inherited, the encoding used to create the byte array then you should be set.
Related Posts:
- What is a NullReferenceException, and how do I fix it?
- How can I convert String to Int?
- What is a NullReferenceException, and how do I fix it?
- Convert int to string?
- How can I add ” character to a multi line string declaration in C#?
- C# List
to string with delimiter - Convert a list of strings to a single string
- C#: how to get first char of a string?
- How do I create a Shared Code project (.shproj)
- How to initialize a list of strings (List
) with many string values - What does {0} mean when found in a string in C#?
- C# – Illegal characters in path
- Getting The ASCII Value of a character in a C# string
- What is the C# version of VB.net’s InputDialog?
- How can I fix the error : “Unreachable Code Detected”
- C# – How to convert string to char?
- Escape double quotes in a string
- .NET graph library around?
- Creating a comma separated list from IList
or IEnumerable - Fastest way to remove first char in a String
- Checking if a string array contains a value, and if so, getting its position
- Substring index and length must refer to a location within the string
- Case insensitive ‘Contains(string)’
- Most efficient way to remove special characters from string
- Is there an equivalent to the Scanner class in C# for strings?
- Adding a newline into a string in C#
- How to format a string as a telephone number in C#
- How to convert UTF-8 byte[] to string
- .NET String.Format() to add commas in thousands place for a number
- How would you count occurrences of a string (actually a char) within a string?
- C# equivalent to Java’s charAt()?
- What is a quick way to force CRLF in C# / .NET?
- How to enable assembly bind failure logging (Fusion) in .NET
- Strip double quotes from a string in .NET
- Check if a string is a palindrome
- Convert string to decimal, keeping fractions
- When should I use a List vs a LinkedList
- Convert JSON String to JSON Object c#
- Convert an array to string
- Unrecognized escape sequence for path string containing backslashes
- C# Encoding a text string with line breaks
- How to find child of a GameObject or the script attached to child GameObject via script
- Process cannot access the file because it is being used by another proess
- How to replace � in a string
- How to convert JSON to XML or XML to JSON?
- Virustotal Trapmine suspicious.low.ml.score
- C# An established connection was aborted by the software in your host machine
- OnCollisionEnter() not working in Unity3D
- Difference between virtual and abstract methods
- How to open .dll files to see what is written inside?
- how does Request.QueryString work?
- C# Java HashMap equivalent
- System.Net.Http: missing from namespace? (using .net 4.5)
- Windows .NET API / Windows 7 / Bluetooth communication with Intel Curie Arduino / Genuino 101
- WFP Grid: MouseRightButtonDown firing occuring BEFORE SelectionChanged on grid. Causing syncing issue
- Can’t add script component because the script class cannot be found?
- ‘do…while’ vs. ‘while’
- Visual Studio /**/ comment shortcut?
- Unable to resolve service for type while attempting to activate
- Multiple Inheritance in C#
- Wait one second in running program
- Deserialize JSON with C#
- “Error while trying to run project: Unable to start program”. Can run program only once. Then VS needs restart
- What is WebResource.axd?
- Associating enums with strings in C#
- What is the best way to implement a “timer”?
- SmtpException: Unable to read data from the transport connection: net_io_connectionclosed
- How can I get the application’s path in a .NET console application?
- How do I encode and decode a base64 string?
- How to keep console window open
- Tree data structure in C#
- Visual Studio: The Operation could not be completed. The parameter is incorrect
- Member ‘
‘ cannot be accessed with an instance reference - Sequence contains no matching element
- when do you need .ascx files and how would you use them?
- How to open a new form from another form
- The entity type
is not part of the model for the current context - Recommendation for C# Matrix Library
- Deep cloning objects
- Regular expression “^[a-zA-Z]” or “[^a-zA-Z]”
- Input string was not in a correct format
- Verify a method call using Moq
- XmlSerializer – There was an error reflecting type
- Run Command Prompt Commands
- How can I wait for a thread to finish with .NET?
- How do I exit a WPF application programmatically?
- OnCollisionEnter is not called in unity
- The name ‘ViewBag’ does not exist in the current context – Visual Studio 2015
- How to create a new object instance from a Type
- does not implement interface member
- Differences between SFTP and “FTP over SSH”
- Remove punctuation from string with Regex
- Unity – How to stop Play Mode in case of infinite loop?
- Go To Definition: “Cannot navigate to the symbol under the caret.”
- Why am I getting an Exception with the message “Invalid setup on a non-virtual (overridable in VB) member…”?
- Is there a keyboard shortcut to maximize the Game window in Unity in Play Mode?
- IF Statement multiple conditions, same statement
- What is the easiest way to handle associative array in c#?
- What does the M stand for in C# Decimal literal notation?
- is inaccessible due to its protection level