随笔 - 56  文章 - 1 评论 - 12 trackbacks - 0

07 2011 档案
WCF学习笔记(1)-- 一个简单的wcf实例
摘要: WCF的服务不能孤立地存在,需要寄宿于一个运行着的进程中,我们把承载WCF服务的进程称为宿主,为服务指定宿主的过程称为服务寄宿(Service Hosting)。我们要用WCF来实现一个远程调用计算的方法步骤一:构建整个解决方案通过VS 2008创建一个空白的解决方案,添加如下四个项目。项目的类型、承载的功能和相互引用关系如下,整个项目在VS下的结构如图2所示。Contracts:一个类库项目,定义服务契约(Service Contract),添加引用System.ServiceMode程序集;Services:一个类库项目,提供对WCF服务的实现。定义在该项目中的所有WCF服务实现了定义在C阅读全文
posted @ 2011-07-29 14:54 通心菜 阅读(566) | 评论 (3) 编辑
在控制台程序中显示进度
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace ConsoleApplication5{ class Program { static void Main(string[] args) { Console.Write("Loading.....0%"); int leftPos = Console.CursorLeft - 2; for (int i = 1; i <= 100; i++)阅读全文
posted @ 2011-07-11 15:29 通心菜 阅读(44) | 评论 (0) 编辑