Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c# Îļþ´«Êä

send :
string path = "E:\\c#\\convey_file\\convey_file\\Form1.cs"; //Òª´«ÊäµÄÎļþ
TcpClient client = new TcpClient();
client.Connect(IPAddress.Parse("192.168.0.52"),9999);
FileStream file = new FileStream(path,FileMode.Open,FileAccess.Read); //×¢ÒâÓëreceiveµÄfilestreamµÄÇø±ð
BinaryReader binaryreader = new BinaryReader(file);
byte[] b = new byte[4098];
int data;
Console.WriteLine("ÕýÔÚ·¢ËÍÎļþ");
while ((data = binaryreader.Read(b, 0, 4098)) != 0) //Õâ¸ö×¢ÒâÊǽ«Îļþд³ÉÁ÷µÄÐÎʽ
{
client.Client.Send(b,data,SocketFlags.None); //·¢ËÍÎļþÁ÷µ½Ä¿±ê»úÆ÷
}
client.Client.Shutdown(SocketShutdown.Both);
binaryreader.Close();
file.Close();
receive:
private Socket s;
TcpListener tl;
public void lis()
{
string path = "d:\\1.cs"; //Òª´«ÈëÎļþµÄ·¾¶
tl = new TcpListener(9999);
tl.Start();
Console.WriteLine("µÈ´ý½ÓÊÜ");
s = tl.AcceptSocket();
FileStream fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write); //×¢ÒâÕâ¸öµÄÊôÐÔºÍsend¶ËÓÐËù²»Í¬
BinaryWriter binarywrite = new BinaryWriter(fs);
int count;
byte[] b = new byte[4098];
while ((count = s.Receive(b, 4098, SocketFlags.None)) != 0) //Õâ¸öÊǽÓÊÜÎļþÁ÷
{
binarywrite.Write(b,0,count); //½«½ÓÊÕµÄÁ÷ÓÃд³ÉÎļþ
}
binarywrite.Close();
fs.Close();
s.Close();
tl.Stop();
Console.WriteLine("Îļþ´«ÊäÍê±Ï");


Ïà¹ØÎĵµ£º

C#ÓëFlash½»»¥

C#ÓëFlash½»»¥ £¨×ª×ÔСÀÚÔÚÏߣ©
C#ÓëFlash½»»¥
Ç°¶ÎÈÕ×Ó¹«Ë¾ÒªÇó×öÒ»¸öC#ÓëFlash½»»¥µÄ¶«Î÷£¬ÓÃÀ´C#Óë¶ÌÐÅèͨѶ½«Êý¾Ý´«µ½FlashÉÏÏÔʾÓë²Ù×÷µÄÓ¦Óá£
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊä ......

Excel µ¼Èësqlserver c#

using System.Data.SqlClient;
using System.Data.OleDb;
 private void button1_Click(object sender, EventArgs e)
        {
OleDbConnection conn = null;
            try
     &nbs ......

C# winformÓë flash as µÄ½»»¥Í¨Ñ¶

Ò»¡¢»ù±¾Ô­Àí¼°¹ý³Ì
Flashͨ¹ýExternalInterfaceÀàÓëÈÝÆ÷Ó¦ÓóÌÐò½øÐÐͨÐÅ¡£Îª´Ë£¬ExternalInterfaceÀàÌṩÁ½¸ö¾²Ì¬ÊôÐÔºÍÁ½¸ö¾²Ì¬·½·¨¡£
ExternalInterface.call(“º¯ÊýÃû”£¬[²ÎÊý…])·½·¨Ö´ÐÐÈÝÆ÷Ó¦ÓóÌÐòµÄ´úÂ룬¸Ã·½·¨ÖÁÉÙÐèÒªÒ»¸ö×Ö·û´®²ÎÊýÀ´Ö¸¶¨Òªµ÷Óõĺ¯ÊýÃû£¬ÆäËüÈκβÎÊý½«×÷Ϊ²ÎÊý±»´«µÝ¸ø± ......

C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨

C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨ 
 
¶ÔÓÚÕýÔò±í´ïʽµÄÓ¦Ó㬻ù±¾ÉÏ¿ÉÒÔ·ÖΪÑéÖ¤¡¢ÌáÈ¡¡¢·Ö¸îºÍÌæ»»¡£½ö½öÀûÓÃRegexÀà¾Í¿ÉÒÔʵÏÖÑéÖ¤ºÍ¼òµ¥Ìæ»»¡£
ÀûÓÃRegexÀàʵÏÖÑéÖ¤
¾­Àú2009ÄêµÄ±¸°¸ºÍDNSÍ£Ö¹½âÎö·ç²¨Ö®ºó£¬´ó²¿·ÖµÄ´øÓз´À¡ÐÔµÄÍøÕ¾ºÍÂÛ̳¶¼¶ÔһЩÃô¸Ð´Ê½øÐÐÁ˹ýÂË£¬°üº¬ÓÐÕâÀàÃô¸Ð´ÊµÄÎÄÕÂҪôÄÚÈ ......

C#½Ó¿ÚÓë³éÏóÀàµÄÇø±ð¡¾×ªÔØ¡¿

      Ò»¡¢³éÏóÀࣺ
      ³éÏóÀàÊÇÌØÊâµÄÀֻ࣬ÊDz»Äܱ»ÊµÀý»¯£»³ý´ËÒÔÍ⣬¾ßÓÐÀàµÄÆäËûÌØÐÔ£»ÖØÒªµÄÊdzéÏóÀà¿ÉÒÔ°üÀ¨³éÏó·½·¨£¬ÕâÊÇÆÕͨÀàËù²»Äܵġ£³éÏó·½·¨Ö»ÄÜÉùÃ÷ÓÚ³éÏóÀàÖУ¬ÇÒ²»°üº¬ÈκÎʵÏÖ£¬ÅÉÉúÀà±ØÐ븲¸ÇËüÃÇ¡£ÁíÍ⣬³éÏóÀà¿ÉÒÔÅÉÉú×ÔÒ»¸ö³éÏóÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ