当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: Technotes, HowTo Series C#
 

 

 ·一个正则表达式的类     »显示摘要«
    摘要:using system; namespace regexlib { /// /// class1 的摘要说明。public class regexlib { public regexlib() { // // todo: 在此处添加构造函数逻辑 // } //搜索输入字符串并返回所有 href=“...”值 string dumphrefs(string inputs......
 ·csdn blog 备份工具    »显示摘要«
    摘要:看到airhand写的csdn blog 备份工具。 输入url,备份一些html和xml到指定目录下,好像只能备一个月的。 ......


C# 编码规范
technotes, howto series

c# coding style guide

by mike krüger icsharpcode.net 【程序编程相关:也来说说C语言

version 0.3 【推荐阅读:MDA,开创大时代

this document may be read as a guide to writing robust and reliable programs. it focuses on programs written in c#, but many of the rules and principles are useful even if you write in another programming language. 【扩展信息:WebWork2与SpringFrame

about the c# coding style guide file organization indentation comments declarations statements white space naming conventions programming practices code examples

1. about the c# coding style guide

2. file organization

2.1 c# sourcefiles

keep your classes/files short, don´t exceed 2000 loc, divide your code up, make structures clearer. put every class in a separate file and name the file like the class name (with .cs as extension of course). this convention makes things much easier.

2.2 directory layout

create a directory for every namespace. (for myproject.testsuite.testtier use myproject/testsuite/testtier as the path, do not use the namespace name with dots.) this makes it easier to map namespaces to the directory layout.

3. indentation

3.1 wrapping lines

when an expression will not fit on a single line, break it up according to these general principles: break after a comma. break after an operator. prefer higher-level breaks to lower-level breaks. align the new line with the beginning of the expression at the same level on the previous line

example of breaking up method calls:

longmethodcall(expr1, expr2,

               expr3, expr4, expr5);

examples of breaking an arithmetic expression:


...   下一页
    摘要:本人在不久前 开始学这使用 dreamweaver 2004 来开发 aspx asp.net 程序 可是发现在vs.net中 打开了以后 没有办法正常的编译。这个问题想了几天以后,一个朋友提示我,重新建立一个新的asp.net项目,把代码粘贴进去就可以运行了。果然。高兴! 可是我又发现一个问题在用dreamweaver创建的模版文件。按上面的办法是没有办法正常运行的,出现,一些代码乱排的现象,......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE