用静态对象就可以了,static,可以全局共享。

解决方案 »

  1.   

    那在静态类中的静态函数,能否在静态函数中使用new 来产生其他通讯类的对象呢
    namespace client_lite
    {
        class qclient
        {
        }    static class trans
        {
            private static String strhost="127.0.0.1";
            private static ushort uiport = Convert.ToUInt16("6000");
            private static String result="";
            qclient qc = new qclient();
            public static int send(String temp)
            {
                try
                {。。