摘要: 1)定义接口。2)定义公共变量(必须在js中定义)。3)引用头文件。4)同时引用头文件和实现头文件的js文件(TS可以删除)到页面中,完整代码如下:【MyClass.js】:varMyModule; (function(MyModule){ varMyClass=(function(){ functionMyClass(){ this.msg=null; } MyClass.prototype.Calling=function(){ alert(this.msg); }; returnMyClass; })(); MyModule.MyClass=MyClass; })(MyModule||( 阅读全文
posted @ 2014-03-12 14:01 happyu0223 阅读(960) 评论(0) 推荐(0) 编辑
摘要: This post relates how to Copy/Clone custom object in C# (Deep and Shallow Clone).In this example I will be having a base class that all my custom object will be inheriting from.Updates: After quiet some research on the subject i recently found some interesting articles on this subject and wanted to 阅读全文
posted @ 2014-03-12 11:25 happyu0223 阅读(368) 评论(0) 推荐(0) 编辑