我想返回一個字節數組的子字符串。字節數組子字符串
(另一個應用程序將數據推到我的數據庫,其中文件具有附加一個前置的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