易截截图软件、单文件、免安装、纯绿色、仅160KB

[摘自c#Bible]c#中namespace的使用(命名空间)

The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET developers.
Code written in a .NET language references classes by their names, and all of these classes
used together suggests an obvious dilemma: What happens if a developer wants to use two
classes that have the same name?
Suppose you write a C# class that reads records from a database and you name the class
Recordset. Code that wants to use your class may create objects as follows:
Recordset MyRecordset = new Recordset();
Now suppose that you package your classes into a .NET assembly and distribute your
assembly for use by other applications. Furthermore, suppose that someone obtains your
assembly and integrates it into his or her application. What happens if that same application
also makes use of another assembly written by someone else, which also contains a class
called Recordset? When the application code creates a new Recordset object, which class is
used to create the object: yours or the class in the other assembly?
This problem can be solved through the C# concept of name-spaces. Namespaces organize
classes under a named group, and the namespace name can be used to help distinguish
between two classes with the same name. Your C# code should use namespaces to help
further identify your classes under a common grouping, especially if you are planning to build
an assembly for use by other developers. Namespaces may even come in handy in C#
applications that you build, because your C# applications may use an external assembly that
uses class names which mirror yours.
Declaring a Namespace
You declare a namespace with the C# namespace keyword. A namespace identifier and curly
brackets follow the namespace keyword. Classes to be included in the namespac


相关文档:

C指针(1)

C语言必知必会
指针:
1.指针声明后要赋值!否则是空指针,可不知道指向了哪里
例如:
void swap(int *a,int *b){
    int *tmp;
    *tmp=*a;
    *a=*b;
    *b=*tmp;
}
本来是想利用上面的swap函数实现两个数的互换,但是*tep=*a;这句话是有误的 ......

[转]ASP.NET(C#)常用代码30例

1. 打开新的窗口并传送参数: 
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString( ......

由C#风潮想起的-给初学编程者的忠告

 我始终认为,对一个初学者来说,IT界的技术风潮是不可以追赶的,而且也没有能力去追
赶。我时常看见自己的DDMM们把课本扔了,去卖些价格不菲的诸如C#, VB.Net 这样的大部
头,这让我感到非常痛心。而许多搞不清指针是咋回事的BBS站友眉飞色舞的讨论C#里面可
以不用指针等等则让我觉得好笑。C#就象当年的ASP一样 ......

C# 将数据导出到Execl汇总

最近在找数据导出到EXCEL的方法,发现竹林bat800在blog中发布的方法,为了便于以后查找转到自己blog下
http://blog.csdn.net/bat800/archive/2007/07/17/1694537.aspx
这是原文地址
一、asp.net中导出Execl的方法:
在asp.net中导出Execl有两种方法,一种是将导出的文件存放在服务器某个文件夹下面,然后将文件地址输出 ......

C#里的treeview控件如何能绑定数据库里的数据

应用程序,窗体里拖放一个TreeView控件,想把数据库里的数据在这个控件里显示出来
  TREEVIEW控件是Winfrom窗体里的 不是ASP.NET里的TREEVIEW
代码如下:
CREATE TABLE CateTable (
      [ID] [int] IDENTITY (1, 1) NOT NULL ,
       [CateName] [nv ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号