C# Base 64 編碼/解碼實現代碼
更新時間:2016年02月29日 23:13:06 投稿:mdxy-dxy
這篇文章主要介紹了C# Base 64 編碼/解碼實現代碼,需要的朋友可以參考下
1、base64 to string
string strPath = "aHR0cDovLzIwMy44MS4yOS40Njo1NTU3L1 9iYWlkdS9yaW5ncy9taWRpLzIwMDA3MzgwLTE2Lm1pZA=="; byte[] bpath = Convert.FromBase64String(strPath); strPath = System.Text.ASCIIEncoding.Default.GetString(bpath);
2、string to base64
System.Text.Encoding encode = System.Text.Encoding.ASCII ; byte[] bytedata = encode.GetBytes( "test"); string strPath = Convert.ToBase64String(bytedata,0,bytedata.Length);
相關文章
C# WinForm中Panel實現用鼠標操作滾動條的實例方法
由于在WinForm中Panel不能直接響應鼠標的滾動事件,只好采用捕獲窗體的滾動事件。2013-03-03

