惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
I
InfoQ
H
Help Net Security
GbyAI
GbyAI
博客园 - 叶小钗
Recent Announcements
Recent Announcements
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
Y
Y Combinator Blog
L
LangChain Blog
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
博客园 - Franky
D
Docker
Jina AI
Jina AI
罗磊的独立博客

博客园 - 左佩玉

通过了 70-316 考试 .NET SDK 工具 线程 进程 程序配置 程序集 全局化和本地化 实现帮助 可访问性设计 实现打印 自定义控件 使用 GDI+ 在ADO.net 中使用xml 绑定、查看和筛选数据 ADO.net 处理和抛出异常 使用Debug和Trace 测试和调试 继承 System.Collections.CollectionBase 创建一个强类型集合类
访问和调用外部组件
左佩玉 · 2005-08-25 · via 博客园 - 左佩玉

访问.NET和COM组件
创建引用 Add Reference
使用 using 关键字

实例化ActiveX控件
添加引用
添加到Toolbox
拖放控件或代码方式

访问Web Service
添加web 引用 Add Web Reference
实例化 webService1 myService = new WebService1();
调用 myService.myMethod();
异步调用

采用回调方式
public void AsyncDemo()
{
    WebService1 myService = new WebService1();
    IAsyncResult Async;
    //为回调方法创建委托
    System.AsyncCallback myCallBack = new System.AsyncCallback(SomeMethod);
    Async = myService.BeginMyMethod(myCallBack,new object());
    string myString;
    //程序暂停,直到调用返回
    myString = myService.EndMyMethod(Async);
}

访问Windows API
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern int Beep(int dwFreq, int dwDuration);