自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 WCF 跨域 Http绑定

跨域服务:特性WebGet在System.ServiceModel.Web中 [ServiceContract] public interface IDomainService { [OperationContract] [WebGet(UriTemplate = "ClientAccessPolicy.xml")] M

2012-04-30 16:46:21 1620

原创 WCF 回调及重入

服务端类代码服务契约: [ServiceContract(CallbackContract=typeof(IserviceCallBack))] public interface IService1 { [OperationContract] string GetData(int value); } public i

2012-04-30 00:36:42 734

原创 WCF服务控制台托管方法(不使用配置文件)

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.ServiceModel.Description;namespace C

2012-04-29 23:55:48 2604

原创 WCF同域动态绑定服务地址

此方法一般用于Web,部署环境经常变化导致IP经常变动 例子是Silveright调用同域WCF服务的方法 WordGameServiceClient GetClient() { BasicHttpBinding basicbind = new BasicHttpBinding(BasicHttpSecurityMode.None)

2012-04-29 13:13:19 1001

转载 使用公用表表达式(CTE)简化嵌套SQL

转自 http://www.cnblogs.com/nokiaguy/archive/2009/02/05/1384860.htm    先看下面一个嵌套的查询语句:select*from person.StateProvincewhere CountryRegionCodein          (select CountryRegionCodefrom person

2012-04-28 17:59:13 1045

原创 使用Lambda表达式重构委托

1.事件通常写法(C# 1.0)this.button.Click +=new EventHandler(button_Click); void button_Click(object sender, EventArgs e) { throw new NotImplementedException(); } 在C#2.0中使用匿名方法this.bu

2012-04-25 10:35:21 389

原创 在ASP.NET MVC中修改默认代码生成/支架模板

到 C:\Program Files (or x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp (or Visual Basic)\Web\MVC (or 2) 3\CodeTemplates复制CodeTemplates目录下文件到项目,删除tt类文件的Custom Tool属性,然后对项目中模板的修改会覆盖

2012-04-16 13:00:16 2137 1

原创 Silverlight 基础收集

属性路径语法 Propertyhttp://msdn.microsoft.com/zh-cn/library/cc645024(v=vs.95).aspx#databinding_sa

2012-04-10 21:34:37 326

原创 LINQ 排序

随即排序 string[] city = new string[] { "台中", "高雄", "新竹", "台南","屏束" }; var ran = (from x in city orderby Guid.NewGuid() select x).Ta

2012-04-08 10:03:53 324

原创 C# 操作符重载 模拟String

模拟String,让引用类型的使用像值类型一样 class MyString { private static Dictionary dic = new Dictionary(); string s; public MyString(string s) { this.s = s;

2012-04-03 23:20:19 390

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除