第一碗饭(.NET)
Ninth
这个作者很懒,什么都没留下…
展开
-
浅拷贝的实现
//浅拷贝的实现//2004.9.2using System;class RefType { public String name; public Int32 age; public RefType(String name,Int32 age) { this.name = name; this.age = age; }}//类型MyType实现了ICloneable接口,可以被浅拷贝class原创 2004-09-02 23:20:00 · 1684 阅读 · 0 评论 -
深拷贝的实现
//深拷贝的实现//2004.9.2using System;using System.Collections;class RefType { public String name; public Int32 age; public RefType(String name,Int32 age) { this.name = name; this.age = age; }}//类型MyType实现原创 2004-09-02 23:59:00 · 2219 阅读 · 1 评论 -
操作符重栽
//操作符重栽//2004.9.4using System;class Complex { double r, v; public Complex(double r, double v) { this.r = r; this.v = v; } //重栽加法操作符(二元) public static Complex operator + (Complex a, Complex b) { ret原创 2004-09-04 09:46:00 · 1757 阅读 · 0 评论