在C#程序中使用VB.NET创建的类 [英] using VB.NET created class in C# program

查看:66
本文介绍了在C#程序中使用VB.NET创建的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个班级clsABC这是由VB.NET创建的。我正在尝试在

C#程序中使用它。虽然我可以在项目参考中添加它,但我无法浏览编码中的方法和属性。

请参阅以下编码:


使用clsABC

clsABC tmpClass = new clsABC();

tmpClass。 < ------我可以看到任何方法和属性。

I have a class "clsABC" which is created by VB.NET. I am trying use it in the
C# program. Although I can add it in the project reference, I can''t browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.

推荐答案

你确定clsABC也是命名空间的名称该课程定义为
。由于使用声明,VS编辑器变得困惑。


----------------

-Atul ,Sky Software http://www.ssware.com

Shell MegaPack For .Net& ActiveX

Windows资源管理器GUI控件

&

快速启动像Appbars,MSN / Office2003样式弹出窗口,

系统托盘图标和快捷方式/互联网快捷方式

----------------


" Stanley" <圣***** @ discussions.microsoft.com>在消息中写道

news:04 ********************************** @ microsof t.com ...
Are you sure clsABC is also the name of the namespace in which the class is
defined. The VS editor is getting confused because of the using statement.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
我有一个类clsABC这是由VB.NET创建的。我正在尝试在
C#程序中使用它。虽然我可以在项目参考中添加它,但我无法浏览编码中的方法和属性。
请参阅以下编码:

使用clsABC
clsABC tmpClass = new clsABC();
tmpClass。 < ------我可以看到任何方法和属性。
I have a class "clsABC" which is created by VB.NET. I am trying use it in
the
C# program. Although I can add it in the project reference, I can''t browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.



" Stanley" <圣***** @ discussions.microsoft.com>在消息中写道

news:04 ********************************** @ microsof t.com ...
"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
我有一个类clsABC这是由VB.NET创建的。我正在尝试在
C#程序中使用它。虽然我可以在项目参考中添加它,但我无法浏览编码中的方法和属性。
请参阅以下编码:

使用clsABC
clsABC tmpClass = new clsABC();
tmpClass。 < ------我可以看到任何方法和属性。
I have a class "clsABC" which is created by VB.NET. I am trying use it in
the
C# program. Although I can add it in the project reference, I can''t browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.




它的方法是公开的吗?


问候


Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http ://www.dotnetconsult.co.uk




为什么不使用对象浏览器。


你确定你有一个名为clsABC而不是模块的课吗?


欢呼,


-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通局


" Stanley" <圣***** @ discussions.microsoft.com>在消息中写道

news:04 ********************************** @ microsof t.com ...
Hi,
Why don''t you use the Object Browser.

Are you sure you have a class named clsABC and not a module?

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
我有一个类clsABC这是由VB.NET创建的。我正在尝试在
C#程序中使用它。虽然我可以在项目参考中添加它,但我无法浏览编码中的方法和属性。
请参阅以下编码:

使用clsABC
clsABC tmpClass = new clsABC();
tmpClass。 < ------我可以看到任何方法和属性。
I have a class "clsABC" which is created by VB.NET. I am trying use it in
the
C# program. Although I can add it in the project reference, I can''t browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.



这篇关于在C#程序中使用VB.NET创建的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆