摘要:
服务器端:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Net;usingSystem.Net.Sockets;namespaceUDPServer{classProgram{staticvoidMain(string[]args){intrecv;byte[]data=newbyte[1024] 阅读全文
摘要:
public object DeCompress(string fileName) { object obj = null; try { using (Stream source = File.OpenRead(fileName)) { using (Stream destination = new MemoryStream()) { using (GZipStream input = new GZipStream(source, CompressionMode.Decompress, true)) { byte[] bytes = new byte[4096]; int n; while ( 阅读全文
摘要:
获取valueforeach (Student ss in stu.Values){ MessageBox.Show(ss.Name.ToString()); } ***********************************************获取keyforeach (string key in stu.Keys) { MessageBox.Show(key);} }****************获取key、valueforeach (KeyValuePair<string, Class1> a in cl) { if (a.Key == s1.Name) Mes 阅读全文
摘要:
生成:<?xml version="1.0" encoding="utf-8"?><CategoryList><Category ID="01"><MainCategory>XML</MainCategory><Description>This is a list my XML articles.</Description><Active>true</Active></Category></CategoryLi 阅读全文