摘要:概述 String在任何语言中,都有它的特殊性,在.NET中也是如此。它属于基本数据类型,也是基本数据类型中唯一的引用类型。字符串可以声明为常量,但是它却放在了堆中。希望通过本文能够使大家对.NET中的String有一个深入的了解。 不可改变对象 在.NET中String是不可改变对象,一旦创建了一个String对象并为它赋值,它就不可能再改变,也就是你不可能改变一个字符串的值。这句话初听起来似乎...
阅读全文
随笔分类 - .Net FrameWork
摘要:简单的SOcket传送文件字符串实现 注:(程序中设置只能上传jpg格式文件,可以传其它类型文件)服务器using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Wind...
阅读全文
摘要:类与结构的示例比较: 结构示例: public struct Person { string Name; int height; int weight public bool overWeight() { //implement something } } 类示例: ...
阅读全文
摘要:来源:Yesky 作者: 发布时间:2006-01-01 ref是传递参数的地址,out是返回值,两者有一定的相同之处,不过也有不同点。 使用ref前必须对变量赋值,out不用。 out的函数会清空变量,即使变量已经赋值也不行,退出函数时所有out引用的变量都要赋值,ref引用的可以修改,也可以不修改。 区别可以参看下面的代码: using System;class TestApp{ sta...
阅读全文
摘要:C#箴言:定义常量的两种方法 2006-06-12 07:00 作者: 出处: BLOG 责任编辑:方舟 在C#中定义常量的方式有两种,一种叫做静态常量(Compile-time constant),另一种叫做动态常量(Runtime constant)。前者用“const”来定义,后者用“readonly”来定义。 对于静态常量(Compile-time constant),...
阅读全文
摘要:How to populate the datagrid on background thread with data binding by using Visual C# View products that this article applies to. Article ID : 318...
阅读全文

浙公网安备 33010602011771号