C#
文章平均质量分 72
czjuttsw
Learning, staying up to date, and working on the latest and greatest in languages and APIs is what keeps me excited.
展开
-
关于逻辑表达式的“短路效应”
眨眼间大三了,压力倍感而至。要说基础理论,大一大二也学得差不多了,大三也正是该磨刀的时候了。但是由于自己刚进大学比较贪玩,导致基础知识不是很扎实,学的范围也不是很广。很惭愧,到了大三,我也只会C++和JAVA,而且钻研的也不是很深。没办法,现在就开始准备把以前该学的东西弥补上。我写的博客其实很肤浅,我之所以写博客,是希望通过这种方式提高自己的计算机水平和表达能力。如果有错误希望原创 2012-09-23 23:06:08 · 4376 阅读 · 1 评论 -
Swap函数
一天,小明去一家IT公司应聘,面试官给他出了一个很简单的题目:请分别用C++,C#和Java实现一个参数为原始类型的交换函数。小明想了想,这还不简单,于是在草稿纸上画了起来:首先是C++:templatevoid swap(T* a,T* b){ T temp; temp = *a; *a = *b; *b = temp;}然后是C原创 2012-12-27 22:22:35 · 1782 阅读 · 0 评论 -
C#的XML代码注释
在C/C++,JAVA中,有两种注释,一种是单行注释,即两根反斜杠(//),另一种是多行注释,即以/*开头,以*/结尾。在Java中,多行注释(Multiline Comment)分为两种形式:1.普通多行注释,比如/* *多行注释 */2.Javadoc注释,比如/** *Javadoc注释 */当Java源文件编译的时候,Javadoc工具会读取原创 2012-12-18 19:38:16 · 4879 阅读 · 0 评论