473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Reading public constants from VBComponents in C#? I don't think C# knows how....

We are writing a C#.net component that uses a VB.net component, that has a
couple of public const's in it, but C# chooses not to see them. What's up
with that. The only way we can get it to work is to use public variable...
?!?

Anyone have any ideas on that?

Thanks
David Taylor
Nov 16 '05 #1
1 960
Hi,

You may try to apply the CLSCompliant attribute to the assembly containing
the VB .NET component and see what the compiler complains about...

In general, I think there should be no problem with constants. Have you also
checked the VB .NET component with the Object Browser? Probably it's just
IntelliSense that cannot see the constants?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"W1ld0ne [MCSD]" <W1*******@hotmail.com> wrote in message
news:e5*************@TK2MSFTNGP12.phx.gbl...
We are writing a C#.net component that uses a VB.net component, that has a
couple of public const's in it, but C# chooses not to see them. What's up
with that. The only way we can get it to work is to use public variable...
?!?

Anyone have any ideas on that?

Thanks
David Taylor


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Carter | last post by:
I use Office 2000, and I have recently upgraded to python 2.3 and win32all-155.exe The following code worked in python 2.2: xlApp = Dispatch("Excel.Application") xlApp.Visible = 1...
3
by: muser | last post by:
With the following code I'm trying to read a text file (infile) and output inaccuracies to the error file (printerfile). The text file is written and stored on disk, while the printerfile has to be...
38
by: Ted | last post by:
Is there a way to define a constant value for a color in a CSS declaration? I have numerous colors in different CSS elements, and if I make a change in color, I have to change all the reference...
4
by: Ron | last post by:
Hello, I keep getting a runtime error with the following ado routine that I run from a VB6 app - note: I tried it with ref to mdac2.6 and mdac2.7 and mdac2.8. This worked once, but it doesn't...
29
by: Joe | last post by:
This is a very basic question, but why can't I do the following ? class schedule { private: static const string mScheduleFile = "schedule.txt"; .... }
0
by: Jim dunn | last post by:
HI I am having problems with C# with regards to its compatibility with win32 API methods, I am trying to read from a windows CE comm port using C# and imported methods from coredll.dll, it seems...
1
by: W1ld0ne [MCSD] | last post by:
We are writing a C#.net component that uses a VB.net component, that has a couple of public const's in it, but C# chooses not to see them. What's up with that. The only way we can get it to work is...
70
by: hstagni | last post by:
When i read a key using getchar() inside a loop, the program stops and wait for a key to be pressed. I actually want the program to continue its execution until a key is pressed. Look at this...
2
by: Leslie Sanford | last post by:
I want to define a set of floating point constants using templates insteand of macros. I'd like to determine whether these constants are floats or doubles at compile time. In my header file, I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.