海鸥航迹

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

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

09 2004 档案

关于对象容器的选择
摘要:编程中免不了要使用容器对象来容纳若干数量的对象。微软的.NET编程平台真是两个字--方便。它提供了一个ArrayList对象,满足了编程时对容器对象的大部分需求。但是,真是如此吗? ArrayList主要提供了一种基于索引的容器,但是,它又提供了Contains函数,以至于可以自己编写按内容查找的函数,但这并不一定高效。实际上,很多情况下,使用基于键的容器更为方便,减少遍历,函数效率显然会增加不少... 阅读全文

posted @ 2004-09-27 10:50 海天一鸥 阅读(1160) 评论(0) 推荐(0) 编辑

[导入]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 海天一鸥 阅读(674) 评论(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 海天一鸥 阅读(837) 评论(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 海天一鸥 阅读(769) 评论(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 海天一鸥 阅读(888) 评论(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 海天一鸥 阅读(757) 评论(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 海天一鸥 阅读(813) 评论(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 海天一鸥 阅读(1033) 评论(0) 推荐(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 海天一鸥 阅读(747) 评论(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 海天一鸥 阅读(1132) 评论(1) 推荐(0) 编辑

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

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

Excel VBA 宏,使用某模版新建文档时,某些cell自动填充
摘要:今天写了一段Excel宏,当根据模版创建Excel时,某些cell的内容自动根据当前机器环境填充。 写的很笨拙,因为不太熟悉VBA和Office事件,全看着帮助完成的。高手若能指点一二,敬请留言啊 Private Sub Workbook_Open()Dim str As Stringstr = Trim(Range("G22").Value)If str = "" ThenRange("G2... 阅读全文

posted @ 2004-09-18 11:18 海天一鸥 阅读(4519) 评论(5) 推荐(0) 编辑

关于JAVA匿名内部类,回调,事件模式的一点讨论 VS dotNET事件模式
摘要:关于JAVA匿名内部类的一点讨论.基本理论:-----------------------------------------------------关于JAVA内部类:一个内部类的定义是定义在另一个类内部的类。 存在它的原因是: 1.一个内部类的对象能够访问创建它的对象的实现,包括私有数据。即内部类实例对包含它的哪个类的实例来说,是特权的。 2.对于同一个包中的其他类来说,内部类能够... 阅读全文

posted @ 2004-09-11 13:45 海天一鸥 阅读(10569) 评论(13) 推荐(0) 编辑

如何办理签证
摘要:查阅相关法律后,办理签证,需要如下物件:1.护照;2.照片(2张,1寸)3.在职证明,需公司出具(原件1,复印件1)4.公司的营业执照(复印件2)5.身份证(复印件2)6.户口簿(原件,复印件2),如果没有原件,必须说明正当理由。7.暂住证(复印件2)8.签证邀请函(如果有,可以很快办理签证,否则,你只有等!) 阅读全文

posted @ 2004-09-02 18:10 海天一鸥 阅读(751) 评论(1) 推荐(0) 编辑

计算列和的宏
摘要:Dim intI As LongDim maxLong As LongDim cell As StringDim sum As Longsum = 0maxLong = 65532For intI = 2 To maxLong cell = "h" + LTrim(Str(intI)) If IsNumeric(Range(cell)) Then sum = sum + ... 阅读全文

posted @ 2004-09-02 13:13 海天一鸥 阅读(719) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示