易截截图软件、单文件、免安装、纯绿色、仅160KB

C# TCP 服务端(PC)与客户端(PPC) 简单代码

服务器端代码
控件:btnStart_Click,btnSend_Click,label4,textBox1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Threading;
using System.Net.Sockets;
using System.Net;
namespace MobileServer
{
    public partial class FrmEasy : Form
    {
        //变量
        private ThreadStart start;
        private Thread listenThread,client_th;
        static private bool m_bListening = false;
        //static private System.Net.IPAddress MyIP = System.Net.IPAddress.Parse("192.168.1.3");
        //获得当前服务端的IP    地址
        static private System.Net.IPAddress MyIP = Dns.Resolve(Dns.GetHostName()).AddressList[0];
        static private TcpListener listener = new TcpListener(MyIP, 5567);
        private String msg;
        ArrayList clientArray = new ArrayList();
        public FrmEasy()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
            start = new ThreadStart(startListen);
            listenThread = new Thread(start);
        }
        private void btnStart_Click(objec


相关文档:

C#查询数据库把结果输出到XML的例子

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
//sqlserver身份验证
//s ......

C#项目打包以及自动安装SQL Sever数据库


本文将介绍C#项目打包以及自动安装SQL Sever数据库,包括创建部署项目、将主程序项目的输出添加到部署项目中、创建安装程序类、创建自定义安装对话框等等。
 
’power by: landlordh   
’for 2000,xp,2003   
Module uninstall   
Sub Main ......

c# asp.net 字符串加密解密的类


using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//Cryptography密码术   
namespace DAL   
{   
    public class Enc ......

C#中结构与类的区别

一.类与结构的示例比较:
结构示例:
public struct Person
{
string Name;
int height;
int weight
public bool overWeight()
{
//implement something
}
}
类示例:
public class TestTime
{
int hours;
int minutes;
int seconds;
public void passtime()
{
//implementation ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号