• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Linford Xu

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 下一页

2013年7月24日

你真的了解装箱(Boxing)和拆箱(Unboxing)吗?
摘要: 所谓装箱就是装箱是将值类型转换为 object 类型或由此值类型实现的任一接口类型的过程。而拆箱就是反过来了。很多人可能都知道这一点,但是是否真的就很了解boxing和unboxing了呢?可以看下下面一段代码,里面发生了几次装箱过程?public static void Main(string[] args) { Int32 v = 5; Object o = v; v = 123; Console.WriteLine(v+" , "+(Int32)o); }不少人可能认为只有... 阅读全文
posted @ 2013-07-24 16:17 Linford Xu 阅读(1173) 评论(0) 推荐(0)
 

2013年7月15日

使用UI Automation实现自动化测试--1
摘要: Introduction UI Automation是Microsoft .NET 3.0框架下提供的一种用于自动化测试的技术,是在MSAA基础上建立的,MSAA就是Microsoft Active Accessibility。UI Automation在某些方面超过了MSAA,UI自动化提供了Windows Vista中,微软Windows XP的全部功能,和Windows Server 2003。 在UI Automation中,所有的窗体、控件都表现为一个AutomationElement, AutomationElement 中包含此控件或窗体的属性,在实现自动化的过程中,我们通过.. 阅读全文
posted @ 2013-07-15 17:24 Linford Xu 阅读(701) 评论(0) 推荐(0)
 
使用UI Automation实现自动化测试--2
摘要: 1. 首先建立一个待测试的winform程序,即UI Automation的服务端。下面是button事件处理程序。 private void CalculateButton_Click(object sender, EventArgs e) { int num1 = 0; int num2 = 0; if (!int.TryParse(textBox1.Text.Trim(), out num1) || !int.TryParse(textBox2.Text.Trim(), out num2)) ... 阅读全文
posted @ 2013-07-15 17:18 Linford Xu 阅读(914) 评论(0) 推荐(0)
 

2013年5月8日

JavaScript Objects
摘要: "Everything" in JavaScript is an Object: a String, a Number, an Array, a Function....In addition, JavaScript allows you to define your own objects.JavaScript ObjectsJavaScript has several built-in objects, like String, Date, Array, and more.An object is just a special kind of data, with pr 阅读全文
posted @ 2013-05-08 17:33 Linford Xu 阅读(251) 评论(0) 推荐(0)
 
The HTML DOM (Document Object Model)
摘要: With the HTML DOM, JavaScript can access all the elements of an HTML document.The HTML DOM (Document Object Model)When a web page is loaded, the browser creates a Document Object Model of the page.The HTML DOM model is constructed as a tree of ObjectsThe HTML DOM TreeWith a programmable object model 阅读全文
posted @ 2013-05-08 14:54 Linford Xu 阅读(245) 评论(0) 推荐(0)
 
JavaScript Errors - Throw and Try to Catch
摘要: The try statement lets you test a block of code for errors.The catch statement lets you handle the error.The throw statement lets you create custom errors.Errors Will Happen!When the JavaScript engine is executing JavaScript code, different errors can occur:It can be syntax errors, typically coding 阅读全文
posted @ 2013-05-08 14:32 Linford Xu 阅读(245) 评论(0) 推荐(0)
 
JavaScript Break and Continue
摘要: The Break StatementThe break statement can be used to jump out of a loop ora switch() statement.The break statement breaks the loop and continues executing the code after the loop (if any):Examplefor (i=0;i<10;i++) { if (i==3) { break; } x=x + "The number is " + i + "<br>&quo 阅读全文
posted @ 2013-05-08 14:18 Linford Xu 阅读(205) 评论(0) 推荐(0)
 
JavaScript Loops
摘要: Different Kinds of LoopsJavaScript supports different kinds of loops:for - loops through a block of code a number of timesfor/in - loops through the properties of an objectwhile - loops through a block of code while a specified condition is truedo/while - also loops through a block of code while a s 阅读全文
posted @ 2013-05-08 13:53 Linford Xu 阅读(222) 评论(0) 推荐(0)
 

2012年9月28日

一篇很棒的关于.NET中栈和堆的比较的文章
摘要: http://www.cnblogs.com/c2303191/articles/1065675.html 阅读全文
posted @ 2012-09-28 18:13 Linford Xu 阅读(140) 评论(0) 推荐(0)
 
.Net 中的托管资源和非托管资源
摘要: .NET中的所有类型都是(直接或间接)从System.Object类型派生的。 CTS中的类型被分成两大类——引用类型(reference type,又叫托管类型[managed type]),分配在内存堆上;值类型(value type),分配在堆栈上。如图:首先说下在栈和堆在window中的区别,栈是向低地址扩展的数据结构,是一块连续的内存区域,先进后出的。而堆是向高地址扩展的数据结构,是不连续的内存区域,顺序随意的。值类型在栈里,先进后出,值类型变量的生命有先后顺序,这个确保了值类型变量在退出作用域以前会释放资源。比引用类型更简单和高效。堆栈是从高地址往低地址分配内存。 引用类型分配.. 阅读全文
posted @ 2012-09-28 15:19 Linford Xu 阅读(535) 评论(0) 推荐(0)
 
上一页 1 2 3 下一页