我想返回一个字节数组的子字符串。字节数组子字符串
(另一个应用程序将数据推到我的数据库,其中文件具有附加一个前置的GUID。我想删除这个GUID,并给该文件时返回给用户)
if (bytes.Length > 38)
{
string s = System.Text.Encoding.ASCII.GetString(bytes);
returnBytes = Convert.FromBase64String(s.Substring(38));
}
是否有可能要做到这一点没有文字编码?也许通过Array.Copy()?
感谢您的任何建议。
检查这个http://stackoverflow.com/questions/13618231/how -to-pass-substring-of-byte-array-using-index-in-c – 2015-02-23 10:56:03
你知道你的guid在字节数组中的确切位置吗? – dyatchenko 2015-02-23 10:56:06