· using System;
using System.Runtime.InteropServices;
using System.Text;namespace ConsoleApplication8{
class Class1{
[STAThread]
static void Main(string[] args){
// Display current status of keys.
Console.WriteLine(
"**BEFORE**\r\nCAP: {0}\r\nSCR: {1}\r\nNUM: {2}",
K...
· 大家中秋好,首先非常感谢xiaxia翻译的资料。
由于我对这个文档也是兴趣浓厚,所以就把下面的部分给翻译了。
希望大家多多指教。4.2 ASP.NET and Web Services
1. 避免将代码放入ASP.NET的ASPX文件中。 所有的代码都应该放在相关代码的Partial类中。
Avoid putting code in ASPX files of ASP.NET...
· 4.4 多线程 Multithreading
1. 应用同步机制空间。
Use Synchronization Domains. See Chapter 8 in Programming .NET Components.
避免手工的同步机制,应为这样容易导致死锁和竞态条件。
a) Avoid manual synchronization because that often leads to deadlocks and race conditions.
2. 永远不...
· 4.6 安全 Security
1. 总是使用强名称发布代码,该名称对于该应用程序而言是私有的,对于你是公有的。
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 PublicKeys
{public cons...
· 4.7 企业服务Enterprise Service
1. 在事务方法里不要捕捉异常。要用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(), SetAbort(),以及相关方法。要用Au...
· 5 资源 Resource
5.1 Programming .NET ComponentsBy Juval Lowy, O’Reilly 2003ISBN: 0596003471
5.2 The .NET Master ClassAuthored by Juval Lowy, this world acclaimed intense class covers everything, from .NET essentials to the application frameworks and system programming.More i...
· 学过软件工程的朋友应该都知道,合理的软件架构(Software Architecture)对后期的维护、新功能的添加是极为有利的。我对研究 Windows 的架构非常有兴趣,自己也想动手实践一下。但是很遗憾,我没有什么大软件的代码可以拿来研究,说句实话,就算是有,可能我也没时间去钻研。我只好拿我以前写的一...