请问VB.NET如何引用C#写的类

天使的打手 2004-12-02 02:59:29
如题
...全文
303 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
DeliverGuy 2004-12-02
  • 打赏
  • 举报
回复
引用方法:
1)先保证C#的类能正常运行,然后生成其解决方案(.dll文件生成后)
2)打开VB.NET的解决方案,右击引用,添加新的引用,通过你自己的选择,选取这个生成后的.dll文件
3) 在VB.NET的代码的最前头,加入"imports 这个引用的名字(一般是这个dll文件名,不包这dll三个字母)"即可
4) 可直接在代码里调用相关的方法和属性了
xisat 2004-12-02
  • 打赏
  • 举报
回复
学习
lsgl2003 2004-12-02
  • 打赏
  • 举报
回复
如果是类文件就是.cs那么就先编译。再进行引用!
或者直接放在bin目录下后,用 imports 引用
浩子 2004-12-02
  • 打赏
  • 举报
回复
应该是说C#写的类库吧,如果是的话直接像VB写的一样导入即可
如果是类文件好像不好引用的,译过来吧:P
羊羽亻子 2004-12-02
  • 打赏
  • 举报
回复
imports classname
天使的打手 2004-12-02
  • 打赏
  • 举报
回复
直接引用不能用啊为什么
  • 打赏
  • 举报
回复
直接引用。
leeyeefeng2004 2004-12-02
  • 打赏
  • 举报
回复
用VBC编译一下,编译成vb的就可以了,至于怎么用vbc搂住自己查一下MSDN就可以了.
earlsen 2004-12-02
  • 打赏
  • 举报
回复
在项目中添加引用不可以啊?
这是第六版的介绍《ASP.NET 4入门经典:涵盖C#VB.NET(第6版)》内容简介:ASP.NET是.NET Framework的一部分,用于构建内容丰富的动态Web站点。其最新的版本ASP.NET 4对上一版进行了许多改进,包括增强了Web窗体,并添加了jQuery的支持。《ASP.NET 4入门经典:涵盖C#VB.NET(第6版)》循序渐进,逐步讲解了如何使用ASP.NET 4构建内容丰富的Web站点,并提供了大量使用C#VB的示例。通过实际动手练习,您将学到关于构建Web站点的第一手信息,同时能够深刻理解在浏览器中查看ASP.NET 4页面时,后台到底发生了什么。 这是第七版,也就是本源码书的介绍 The ultimate programming guide to ASP.NET 4.5, by popular author and Microsoft MVP Imar Spaanjaars Updated for ASP.NET 4.5, this introductory book is filled with helpful examples and contains a user-friendly, step-by-step format. Written by popular author and Microsoft ASP.NET MVP Imar Spaanjaars, this book walks you through ASP.NET, Microsoft's technology for building dynamically generated web pages. This edition retains the highly accessible approach to building the Planet Wrox website example, an online community site featuring product reviews, picture sharing, bonus content for registered users, and more. Contains the comprehensive guide to the latest technology additions to ASP.NET 4.5 Shows how to build basic ASP.NET web pages and configure their server Includes information on how to add features with pre-built server controls Reveals how to design pages and make them consistent Contains the information needed for getting user input and displaying data Beginning ASP.NET 4.5 in C# and VB uses Spaanjaars's distinct writing style to put you at ease with learning ASP.NET 4.5.

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧