1。 XML Serializer。这个是 ASP。NET 中 Web Service SOAP 请求的发送和接受默认使用的方式。指序列化对象的公共属性和成员。
2。 SOAP Serializer . DotNet Remoting 使用的对象传送方式。这个时候传送的对象要求有 Serializable 标志。
3. BinarySerializer 。同2, 只不过是二进制格式。
代码示例:
考虑一个 Person 对象,会有一些属性比如fullname,唯一 ID,电话(最多三个。)
[Serializable]
public class Phone
{
private string _phoneNumber="";
private string _phoneType="";
public Phone(string phoneType,string phoneNumner)
{
_phoneNumber=phoneNumner;
_phoneType=phoneType;
}
public string PhoneDescp
{
get
{
return string.Format("{0}\t{1}",_phoneType,_phoneNumber);
}
}
public Phone()
{
}
}
[Serializable]
public class Person
{
public Person()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//电话列表假设只能最多有三个
private Phone [] _allPhones=new Phone[3];
//全称
private string fullName="";
//唯一的标识
private System.Guid id=System.Guid.NewGuid();
public string FullName
{
get{return fullName;}
set{fullName=value;}
}
/// <summary>
/// 标识
/// </summary>
public System.Guid ID
{
get
{
return id;
}
}
public Phone this[int phoneIndex]
{
get
{
System.Diagnostics.Debug.Assert(phoneIndex>=0 && phoneIndex<=2);
return _allPhones[phoneIndex];
}
set
{
System.Diagnostics.Debug.Assert(phoneIndex>=0 && phoneIndex<=2);
_allPhones[phoneIndex]=value;
}
}
}
如果用 XML Serializer
只能看到一下结果。只序列华了 fullname
---------------------------
---------------------------
<?xml version="1.0" encoding="utf-16"?>
<Person xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FullName>MontaqueHou</FullName>
</Person>
---------------------------
OK
---------------------------
注意 GUID 和 Phone 都没有序列化。长度为195 个字节。
而采用 SOAP 序列华则序列化了所有,2022 个字节。
---------------------------
---------------------------
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1:Person id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Comparation/Comparation%2C%20Version%3D1.0.1698.18683%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_allPhones href="#ref-3"/>
<fullName id="ref-4">MontaqueHou</fullName>
<id>
<_a>120451046</_a>
<_b>-8025</_b>
<_c>17783</_c>
<_d>155</_d>
<_e>187</_e>
<_f>62</_f>
<_g>53</_g>
<_h>99</_h>
<_i>190</_i>
<_j>9</_j>
<_k>169</_k>
</id>
</a1:Person>
<SOAP-ENC:Array id="ref-3" SOAP-ENC:arrayType="a1:Phone[3]" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Comparation/Comparation%2C%20Version%3D1.0.1698.18683%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<item href="#ref-5"/>
<item href="#ref-6"/>
<item href="#ref-7"/>
</SOAP-ENC:Array>
<a1:Phone id="ref-5" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Comparation/Comparation%2C%20Version%3D1.0.1698.18683%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_phoneNumber id="ref-8">13817327101-000</_phoneNumber>
<_phoneType id="ref-9">Type 1</_phoneType>
</a1:Phone>
<a1:Phone id="ref-6" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Comparation/Comparation%2C%20Version%3D1.0.1698.18683%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_phoneNumber id="ref-10">13817327101-001</_phoneNumber>
<_phoneType href="#ref-9"/>
</a1:Phone>
<a1:Phone id="ref-7" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Comparation/Comparation%2C%20Version%3D1.0.1698.18683%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_phoneNumber id="ref-11">13817327101-002</_phoneNumber>
<_phoneType href="#ref-9"/>
</a1:Phone>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---------------------------
OK
---------------------------
Binary 也序列华了所有属性。517 个字节
---------------------------
---------------------------
00-01-00-00-00-FF-FF-FF-FF-01-00-00-00-00-00-00-00-0C-02-00-00-00-49-43-6F-6D-70-61-72-61-74-69-6F-6E-2C-20-56-65-72-73-69-6F-6E-3D-31-2E-30-2E-31-36-39-38-2E-31-38-36-38-33-2C-20-43-75-6C-74-75-72-65-3D-6E-65-75-74-72-61-6C-2C-20-50-75-62-6C-69-63-4B-65-79-54-6F-6B-65-6E-3D-6E-75-6C-6C-05-01-00-00-00-12-43-6F-6D-70-61-72-61-74-69-6F-6E-2E-50-65-72-73-6F-6E-03-00-00-00-0A-5F-61-6C-6C-50-68-6F-6E-65-73-08-66-75-6C-6C-4E-61-6D-65-02-69-64-04-01-03-13-43-6F-6D-70-61-72-61-74-69-6F-6E-2E-50-68-6F-6E-65-5B-5D-02-00-00-00-0B-53-79-73-74-65-6D-2E-47-75-69-64-02-00-00-00-09-03-00-00-00-06-04-00-00-00-0B-4D-6F-6E-74-61-71-75-65-48-6F-75-04-FB-FF-FF-FF-0B-53-79-73-74-65-6D-2E-47-75-69-64-0B-00-00-00-02-5F-61-02-5F-62-02-5F-63-02-5F-64-02-5F-65-02-5F-66-02-5F-67-02-5F-68-02-5F-69-02-5F-6A-02-5F-6B-00-00-00-00-00-00-00-00-00-00-00-08-07-07-02-02-02-02-02-02-02-02-E6-EF-2D-07-A7-E0-77-45-9B-BB-3E-35-63-BE-09-A9-07-03-00-00-00-00-01-00-00-00-03-00-00-00-04-11-43-6F-6D-70-61-72-61-74-69-6F-6E-2E-50-68-6F-6E-65-02-00-00-00-09-06-00-00-00-09-07-00-00-00-09-08-00-00-00-05-06-00-00-00-11-43-6F-6D-70-61-72-61-74-69-6F-6E-2E-50-68-6F-6E-65-02-00-00-00-0C-5F-70-68-6F-6E-65-4E-75-6D-62-65-72-0A-5F-70-68-6F-6E-65-54-79-70-65-01-01-02-00-00-00-06-09-00-00-00-0F-31-33-38-31-37-33-32-37-31-30-31-2D-30-30-30-06-0A-00-00-00-06-54-79-70-65-20-31-01-07-00-00-00-06-00-00-00-06-0B-00-00-00-0F-31-33-38-31-37-33-32-37-31-30-31-2D-30-30-31-09-0A-00-00-00-01-08-00-00-00-06-00-00-00-06-0D-00-00-00-0F-31-33-38-31-37-33-32-37-31-30-31-2D-30-30-32-09-0A-00-00-00-0B
---------------------------
OK
---------------------------
看了这个结果你就明白DotNEt remoting 的优越性了。hh
declare @para int
set @para=1
declare @k varchar(20),@sql varchar(50)
while @para<9
begin
set @k='p'+ convert(varchar,@para)
print @k
set @sql='alter table test2 add ' + @k + ' int '
print @sql
execute (@sql)
set @para=@para+1
end
摘要:C# Code Review Checklist, 总共39条. 涵盖面比较广,但不是特别的全面. (全文共10164字)——点击
此处阅读全文
Download Location: http://www.microsoft.com/downloads/details.aspx?FamilyId=80DF04BC-267D-4919-8BB4-1F84B7EB1368&displaylang=en
“企业规范框架”(EIF) 将解决构建分布式应用程序时遇到的一个关键难题:在高容量的生产环境中实现有效的监视和故障排查。EIF 将提供一个一致、简单的应用程序编程接口 (API) 和配置层,以统一内置于 Windows 中的现有的事件记录和跟踪机制。这将使开发人员能够发布由支持和操作小组监视和分析的审计、错误、警告、业务事件和诊断事件。这些现有的和新的开发人员功能将让使用 Visual Studio .NET 的企业客户变得更高效,同时还可以降低部署成本。
要解决的问题: 让报表显示的时候不显示 默认的 ToolTip Hint.
比如:
解决办法:
目前好像还是一个小的bug, 只能对每个文本框设置.
1. 起始水晶报表中又很多可自定义的东西, 可以自定义的地方一般会有一个 X-2 的标志, 这里面可以写自定义函数逻辑.
2. 解决上述问题的办法就是选择工具提示文字 右边的自定义按钮,输入一个他无法显示的字符 CHR(9) 起始就是tab 键. 然后就ok了.
When you design your smart client application, you can choose from a number of methods to connect it to other resources, including:
- Microsoft® .NET Enterprise Services.
- Microsoft .NET remoting.
- Microsoft Windows® Message Queuing (also known as MSMQ).
- Web services.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scag-ch03.asp
Crystal Reports for Visual Studio .NET 2003 - NEW - released April 2004 (only for Visual Studio .NET 2003)
Service pack 2 - EXE 7MB
Service pack readme - PDF 89KB
This file contains the latest merge modules required for deploying .NET applications using Crystal Reports for Visual Studio .NET 2003. These merge modules may be incorporated into MSI-based setup packages to include the appropriate runtime files.
published : 2004-4-29
文件的构造,除了 %MessageId% 之外,还有几个可以选择
The following table lists the supported macros and describes how the File send handler substitutes them.
| Macro name |
Substitute value |
| %datetime% |
Coordinated Universal Time (UTC) date time in the format YYYY-MM-DDThhmmss (for example, 1997-07-12T103508). |
| %datetime_bts2000% |
UTC date time in the format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (for example, 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds). |
| %datetime.tz% |
Local date time plus time zone from GMT in the format YYYY-MM-DDThhmmssTZD, (for example, 1997-07-12T103508+800). |
| %DestinationParty% |
Name of the destination party. The value comes from the message context property BTS.DestinationParty. |
| %DestinationPartyQualifier% |
Qualifier of the destination party. The value comes from the message context property BTS.DestinationPartyQualifier. |
| %MessageID% |
Globally unique identifier (GUID) of the message in BizTalk Server. The value comes directly from the message context property BTS.MessageID. |
| %SourceFileName% |
Name of the file from where the File adapter read the message. The file name includes the extension and excludes the file path, for example, Sample.xml. When substituting this property, the File adapter extracts the file name from the absolute file path stored in the FILE.ReceivedFileName context property. If the context property does not have a value, for example, if a message was received on an adapter other than the File adapter, the macro will not be substituted and will remain in the file name as is (for example, C:\Drop\%SourceFileName%). |
| %SourceParty% |
Name of the source party from which the File adapter received the message. |
| %SourcePartyQualifier% |
Qualifier of the source party from which the File adapter received the message. |
| %time% |
UTC time in the format hhmmss. |
| %time.tz% |
Local time plus time zone from GMT in the format hhmmssTZD (for example, 124525+530). |