博文

介绍本关于算法的好书(2007-10-24 22:26:00)

摘要:书名:<<Data Structures and Algorithms Using C#>> 书的简介: 1、C# Programmers: no more translating data structures from C++ or Java to use in your programs! Mike McMillan provides a tutorial on how to use data structures and algorithms plus the first comprehensive reference for C# implementation of data structures and algorithms found in the .NET Framework library, as well as those developed by the programmer. The approach is very practical, using timing tests rather than Big O notation to analyze the efficiency of an approach. Coverage includes arrays and array lists, linked lists, hash tables, dictionaries, trees, graphs, and sorting and searching algorithms, as well as more advanced algorithms such as probabilistic algorithms and dynamic programming. This is the perfect resource for C# professionals and students alike.
2、我的BLOG连接上都有。 书的封面: 下载地址:http://knowfree.net/2007/10/13/data-structures-and-algorithms-using-c-2.kf 希望对大家学习有所帮助!如果有关于算法的书籍也可以反馈给我,谢谢!
 ......

阅读全文(3552) | 评论:0

(转)C#与java的区别(2007-10-23 13:44:00)

摘要:引用地址:http://www.cnblogs.com/adaiye/archive/2007/10/23/934272.html 1.属性:
java中定义和访问均要用get和set方法,可以不成对出现。
c#中是真正的属性,定义时get和set也不必同时出现,访问时用.号即可。不用get,set

2.对象索引
就是对象数组
public Story this [int index] {

3.C#中,不用任何范围修饰符时,默认的是protect,因而不能在类外被访问.

4.因为JAVA规定,在一个文件中只能有一个public类,而且这个类的名称必须与文件名一模一样,这是一个区别

5.在C#中,它是以Main方法来定位入口的.如果一个程序中没有一个名为Main的方法,就会出"找不到入口的错误".不要把Main写成main哟

6.C#预定义的简单数据类型比Java多。例如,C#有unit,即无符号整数

7.忘掉Java中的static final修饰符。在C#中,常量可以用const关键词声明
C#的设计者还增加了readonly关键词,readonly域只能通过初始化器或类的构造函数设置
8.公用类的入口点:c#是可以对Main进行重载(java中是main),允许有int返回值和空参数的Main

9.在Java中,switch语句只能处理整数。但C#中的switch语句不同,它还能够处理字符变量。请考虑下面用switch语句处理字符串变量的C#代码

10.C#没有>>>移位操作符

11.goto关键词:
Java不用goto关键词。在C#中,goto允许你转到指定的标签。不过,C#以特别谨慎的态度对待goto,比如它不允许goto转入到语句块的内部。在Java中,你可以用带标签的语句加上break或continue取代C#中的goto。

12.int[] x = { 0, 1, 2, 3 };
int x[] = { 0, 1, 2, 3 };
但在C#中,只有第一行代码合法,[]不能放到变量名字之后。
......

阅读全文(2876) | 评论:0