public static byte[] StringToBytes(string requestXML){
byte[] data = null;
try{
Encoding enc = System.Text.Encoding.ASCII;
data = enc.GetBytes(requestXML);
}
catch (Exception ex){
logger.LogInfo("Library.Functions.FileToBase64(): Exception: " + ex.ToString());
return null;
}
return data;
}
byte[] data = null;
try{
Encoding enc = System.Text.Encoding.ASCII;
data = enc.GetBytes(requestXML);
}
catch (Exception ex){
logger.LogInfo("Library.Functions.FileToBase64(): Exception: " + ex.ToString());
return null;
}
return data;
}
No comments:
Post a Comment