摘要: 此程序需要安装ftp服务器,安装adobe reader(我这里使用的adobe reader9.0) 1、部署ftp服务器 将ftp的权限设置为允许匿名访问,部署完成 2.安装adobe reader9.0阅读器 3、设置visual studio 加载adobe reader的插件 工具箱-选择项-com组件 选择adobe PDF Reader 确定完成 到此可以在win... 阅读全文
posted @ 2017-06-22 18:30 大漠孤烟-1234 阅读(804) 评论(0) 推荐(0)
摘要: 服务端代码: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; namespace UdpsocketServer { ... 阅读全文
posted @ 2017-06-20 18:44 大漠孤烟-1234 阅读(8169) 评论(0) 推荐(0)
摘要: 1、什么是异步? 异步操作通常用于执行完成时间可能较长的任务,如打开大文件、连接远程计算机或查询数据库。异步操作在主应用程序线程以外的线程中执行。应用程序调用方法异步执行某个操作时,应用程序可在异步方法执行其任务时继续执行。 2、同步与异步的区别 同步(Synchronous):在执行某个操作时,应用程序必须等待该操作执行完成后才能继续执行。 异步(Asynchronous):在执行某个操作时,应... 阅读全文
posted @ 2017-06-19 02:36 大漠孤烟-1234 阅读(806) 评论(0) 推荐(0)
摘要: 第一步:引入Log4net.dll 文件的引用 第二步:添加LogHelper类,代码如下 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using log4net; namespace DemoLog4net ... 阅读全文
posted @ 2017-06-17 14:47 大漠孤烟-1234 阅读(2185) 评论(0) 推荐(0)
摘要: 这个项目是一个控制台应用程序: 服务器端:using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; // State object for reading client data asynchronously public class State... 阅读全文
posted @ 2016-11-14 16:34 大漠孤烟-1234 阅读(1394) 评论(0) 推荐(0)
摘要: 刚开始学习wcf,根据官方网站的说明写下的代码 第一步: 建立一个类库项目GettingStartedLib,首先添加wcf引用System.ServiceModel; 添加接口ICalculator,添加类CalculatorService实现接口ICalculator 代码:ICalculato 阅读全文
posted @ 2016-11-05 18:52 大漠孤烟-1234 阅读(2279) 评论(0) 推荐(0)
摘要: 初次学习实现WCF winform程序的通信,主要功能是实现图片的传输。 下面是实现步骤: 第一步: 首先建立一个类库项目TransferPicLib,导入wcf需要的引用System.ServiceModel,建立接口ITransferPicService,建立类文件TransferPicServ 阅读全文
posted @ 2016-11-05 15:44 大漠孤烟-1234 阅读(1162) 评论(2) 推荐(0)
摘要: String.Empty和""是一样的,都是空,习惯用string.empty。 Null和他们就有区别了,就是没有值,也没分配地址,此处可以理解成什么都没有。 阅读全文
posted @ 2016-04-04 12:01 大漠孤烟-1234 阅读(297) 评论(0) 推荐(0)
摘要: C#中,判断相等有两种方式,一种是传统的==操作,一种是object提供的Equals方法。二者的区别在于: 一、==操作符判断的是堆栈中的值,Equlas判断的是堆中的值。 C#提供值类型和引用类型,值类型存储在栈上,故用==判断是直接判断其值是否相等,因为值类型不存在堆中的数据,因此值类型的Equals也是判断数据。即,对于值类型而言,==与Equals相同,均是判断其值是否相等。 对于引用类... 阅读全文
posted @ 2016-04-04 11:58 大漠孤烟-1234 阅读(16195) 评论(0) 推荐(4)
摘要: 直接以一个例子说明:using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 ... 阅读全文
posted @ 2016-04-02 20:16 大漠孤烟-1234 阅读(663) 评论(0) 推荐(0)