海鸥航迹

学习之笔记,好文之收集。

导航

2004年9月22日 #

[导入]What is the equivalent to regsvr32 in .NET?

摘要: Where you once used Regsvr32 on unmanaged COM libraries, you will now use Regasm on managed .NET libraries. “Regsvr32 is the command-line tool that registers .dll files as command components in the re... 阅读全文

posted @ 2004-09-22 09:39 海天一鸥 阅读(671) 评论(1) 推荐(0) 编辑

[导入]How to keep a local variable in scope across a try and catch block?

摘要: The following code won't work, because conn goes out of scope before you enter the catch block. try { Connection conn = new Connection(); conn.Open(); } ... 阅读全文

posted @ 2004-09-22 09:39 海天一鸥 阅读(835) 评论(1) 推荐(0) 编辑

[导入]Are Generics in .NET like Templates in C++?

摘要: No. While Generic types do have a similar syntax to C++ templates, they are instantiated at runtime as opposed to compile time, and they can be reflected on via meta-data. Also, in Generics, member ... 阅读全文

posted @ 2004-09-22 09:37 海天一鸥 阅读(766) 评论(1) 推荐(0) 编辑

[导入]How can I update my user interface from a thread that did not create it?

摘要: When performing any action on a control which requires the updating of a user interface element (e.g. setting the Text property on almost any class derived from Control, updating the data source behin... 阅读全文

posted @ 2004-09-22 09:35 海天一鸥 阅读(885) 评论(1) 推荐(0) 编辑

[导入]Why does my Windows Form project not use visual styles in XP even when I call Application.EnableVisualStyles?

摘要: If you set a property on a Windows Forms control which forces the creation of the control (e.g. the SelectedIndex property on the ComboBox class), the control (and perhaps the rest of the form) w... 阅读全文

posted @ 2004-09-22 09:34 海天一鸥 阅读(754) 评论(1) 推荐(0) 编辑

[导入]How can I subscribe to events exposed by a remoted object?

摘要: Delegates require information about the type that the method is associated with in order to make a call. In a single app-domain, this isn't a problem, because the server (the object firing the e... 阅读全文

posted @ 2004-09-22 09:34 海天一鸥 阅读(809) 评论(3) 推荐(0) 编辑

[导入]Why does C#'s iterators feature spit out a class definition instead of a struct definition?

摘要: Q: Why does C#'s iterators feature spit out a class definition instead of a struct definition? The iterators feature in C# generates classes that implement the enumerators required. This is detailed... 阅读全文

posted @ 2004-09-22 09:34 海天一鸥 阅读(845) 评论(1) 推荐(0) 编辑

[导入]How can I run another application or batch file from my Visual C# .NET code?

摘要: Posted by: Duncan Mackenzie, MSDNThis post applies to Visual C# .NET 2002/2003 Suppose you want to run a command line application, open up another Windows program, or even bring up the default web bro... 阅读全文

posted @ 2004-09-22 09:33 海天一鸥 阅读(1030) 评论(0) 推荐(0) 编辑

[导入]Does C# support variable arguments (vararg's) on methods?

摘要: There was a suggestion/question on the Product Feedback site for VS2005 that suggested that the params keyword may not be that well understood. The params keyword can be applied on a method parameter... 阅读全文

posted @ 2004-09-22 09:33 海天一鸥 阅读(788) 评论(1) 推荐(0) 编辑

[导入]Where can I find sample C# code for simple threading?

摘要: Refer to the System.Threading namespace on MSDN for full details. Meanwhile here is a quick taste. using System; using System.Threading; class ThreadTest { public void Runme() { ... 阅读全文

posted @ 2004-09-22 09:33 海天一鸥 阅读(743) 评论(1) 推荐(0) 编辑

[导入]Why does my switch statement works differently?

摘要: C# does not support an explicit fall through for case blocks (unless the block is empty) For an explanation of why, see Why is the C# switch statement designed to not allow fall through, but still re... 阅读全文

posted @ 2004-09-22 09:32 海天一鸥 阅读(1130) 评论(1) 推荐(0) 编辑

ADO.NET 2.0 中的架构

摘要: 了解在 ADO.NET 中对于从您的数据源访问元数据的增强支持。 文章太长,点击此阅读全文 阅读全文

posted @ 2004-09-22 08:36 海天一鸥 阅读(1470) 评论(1) 推荐(0) 编辑

ADO.NET 2.0 中的架构

摘要: 发布日期: 09/19/2004 | 更新日期: 09/19/2004 Bob BeaucheminDevelopMentor 适用于:Microsoft ADO.NET 2.0Microsoft Visual Studio 2005C# 编程语言 摘要:了解在 ADO.NET 中对于从您的数据源访问元数据的增强支持。 下载相关的 SchemasSample.exe 示例代码。 本页内容 ... 阅读全文

posted @ 2004-09-22 08:31 海天一鸥 阅读(3191) 评论(1) 推荐(0) 编辑