Generics in C# Generics are the most useful C# 2.0 language extensions, beside Anonymous methods, Iterators, Partial types And Nullable types.What are generics?Generics permit classes, structs, interfaces, delegates, and methods to be parameterized
編碼|規範 4.5遠程操作 Remoting1.寧可使用管理配置(設定檔)而不使用程式自動設定。Prefer administrator configuration to programmatic configation.2.總是在單獨調用對象裡完成IDisposable。Always implement IDisposable on single call objects.3.遠程操作時總是選用TCP通道和二進位格式Always prefer
編碼|規範 4.6安全 Security1.總是使用強式名稱發布代碼,該名稱對於該應用程式而言是私人的,對於你是公有的。Always demand your own strong name on assemblies and components that are private to the application, but are public(so that only you use them).public class
編碼|規範 4.7企業服務Enterprise Service1.在事務方法裡不要捕捉異常。要用AutoComplete屬性。Do not catch exceptions in a transactional method. Use the AutoComplete attribute.a) See Chapter 4 in COM and .NET Component Services.2.不要調用SetComplete(),
編碼|規範 5資源 Resource5.1 Programming .NET Components By Juval Lowy, O’Reilly 2003 ISBN: 05960034715.2 The .NET Master Class Authored by Juval Lowy, this world acclaimed intense class covers everything, from .NET
standard 1 命名規則與風格 在以前版本的Visual Studio中,微軟曾建議使用匈牙利命名法來寫代碼.在最近發布的.NET和它的程式設計語言中,微軟更換了他的這一法則.1. 對格式與方法名稱使用PASCAL風格[1] public class SomeClass { public SomeMethod(){} }2.