摘要:
The difference between the two operators is that the Cast operator will attempt to cast everyelement in the collection to the specified type to be put into the output sequence. If there is a type in thecollection that cannot be cast to the specified type, an exception will be thrown. The OfType oper 阅读全文
摘要:
分类:ASP Dot Net2008-01-08 11:229258人阅读评论(29)收藏举报 partial关键字 C#2.0提供的新关键字,用来将一个class、struct或interface的定义拆分,写在不同的源文件中。每个源文件包含类定义的一部分,编译应用程序时将把所有部分组合起来。在以下几种情况下需要拆分类定义:1.处理大型项目时,使一个类分布于多个独立文件中可以让多位程序员同时对该类进行处理。2.使用自动生成的源时,无需重新创建源文件便可将代码添加到类中。Visual Studio 在创建 Windows 窗体、Web 服务包装代码等时都使用此方法。无需编辑 Visual St 阅读全文
摘要:
ActionResult is an abstract class that can have several subtypes:a) ViewResult - Renders a specifed view to the response streamb) PartialViewResult - Renders a specifed partial view to the response streamc) EmptyResult - An empty response is returnedd) RedirectResult - Performs an HTTP redirection t 阅读全文