易截截图软件、单文件、免安装、纯绿色、仅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语言中没有函数重载的概念

C语言中没有函数重载的概念!!
C语言中没有函数重载的概念!!
今天MSN群中有个人问我C语言的问题:
     (两个函数实现的功能相同
       但是它们参数的个数不同
       我用一个函数把这个两个函数封起来
  &n ......

090928日c语言学习日记(文件I/O)

#include<stdio.h>
#include<stdlib.h>
#define MAX 41
static int i=0;
int main(void)
{
FILE *fp;
char words[MAX];
if((fp=fopen("words","a+"))==NULL)
{
fprintf(stdout,"Can't open \" word\" file\n");
exit(1);
}
puts("Enter words to add to the file,press the enter.");
......

用C#播放音频和Flash

用C#播放音频和Flash
WinForm中如何播放声音与Flash动画
注意:小括号内的是按钮的其它翻译名称,不同版本的译名是有区别的。
一、在VC#播放声音
    新建一个VC#的Windows Form工程(Windows应用程序),并且定义两个菜单按钮(menuItem1,menuItem2)。
    选择菜单中的&ldqu ......

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

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

c# web service 实例

 微软在其.net战略中,对其主推的Web Service做了大肆的宣扬。现在,Web
Service正如火如荼地发展着,相关的各项新技术层出不穷。Web
Service的发展正构筑着互联网时代美好的明天。在本文中,我将向大家介绍Web Service的一些基本知识、如何用C#建立一个Web
Service。通过文章,我们还将对WSDL、UDDI以及未来的Web ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号