惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

博客园 - 城

使用WebClient进行上传文件 东北话 c# MD5加密 SubVersion的多库权限配置 Visual Studio .NET has detected Web server is not running ASP.NET 1.1(vs.2003) Unable to generate a temporary class (result=1).error CS2001: Source file '...... VS.net 2005快捷键一览表 Tsql123 Windows Service OnCustomCommand 的問題 vba控件常规使用 vba 中 加载DLL错误的解决方法 无法在Web服务器上启动调试。您不具备调试此应用程序的权限,此项目的URL位于Internet区域。 安装程序工具 (Installutil.exe) 文件上传 XML简单操作 WSE2.0加密Web Service soap验证 windows2003reg 在1433 以外的任何端口上连接到SQL Server
序列化成字符串 - 城 - 博客园
· 2007-08-18 · via 博客园 - 城

 1
 2[Serializable]
 3 public class  Info
 4    {
 5  public string name;
 6  public string age;
 7 }

 8
 9private string Serialize()
10{
11   ArrayList al = new ArrayList();
12   Info a1 =  new Info();
13   a1.name ="a";
14   a1.age ="a";
15
16   Info b1 =  new Info();
17   b1.name ="a";
18   b1.age ="a";
19
20   al.Add(a1);
21   al.Add(b1);
22
23   BinaryFormatter br = new BinaryFormatter();
24   MemoryStream ms = new MemoryStream();
25   br.Serialize(ms,al);  
26   _resultbyte = ms.ToArray();
27   _resultstr = Convert.ToBase64String(_resultbyte,0,_resultbyte.Length);
28   ms.Close();
29   
30  }

31
32  private void Deserialize(string _resultbyte)
33  {     
34   byte[] bb = Convert.FromBase64String(_resultstr);
35   MemoryStream aa = new MemoryStream(bb);
36   BinaryFormatter br = new BinaryFormatter();
37   ArrayList tes = (ArrayList)br.Deserialize(aa);
38  
39  }

40
41 
42