資源簡介
WCF實例
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Runtime.Serialization;
namespace?LotterytWcfService
{
????[DataContract]
????public?class?JsonResult
????{
????????///?
????????///?Construct
????????///?
????????public?JsonResult(string?name?string?address?string?phone)
????????{
????????????_name?=?string.Format(“Name:{0}“?name);
????????????_address?=?string.Format(“Address:{0}“?address);
????????????_phoneNumber?=?string.Format(“PhoneNubmer:{0}“?phone);
????????}
????????private?string?_name;
????????///?
????????///?Name
????????///?
????????[DataMember]
????????public?string?Name
????????{
????????????get?{?return?_name;?}
????????????set?{?_name?=?value;?}
?????
- 上一篇:C# 貪吃蛇游戲源碼
- 下一篇:C# 仿QQ抖動窗體
評論
共有 條評論