Home All Groups Group Topic Archive Search About

Accessing C# Enum in vb6

Author
3 Nov 2007 3:56 AM
Sriman
Hi,
  Did any one tried to access/called  C# enum in vb6? Actually we are
migrating the few vb6 components to C#.net. Conversion process went fine. But
I could not able to access/see the exact Enum values in vb6  Like
C# Enum
==========
public enum test
{
  Grade = 1
}
..Net regasm/tlbexp exporting the .net assembly to .tlb like
publie enum test
{
test_Grade =1
}
So, the question is .Net added/included the Enum name to values i.e "Test_".
  If you came accross the same situation, How you managed to resolve the
issue?
Any Help would be greatly appreciated.

Note: Client is not going to change the existing vb6 applicaiton
Regards,
Sriman.

Author
3 Nov 2007 8:40 AM
Mattias Sjögren
>  If you came accross the same situation, How you managed to resolve the
>issue?

Most people just accept and live with it.

But since you have existing VB6 components, you should be able to use
the existing type libraries instead of the one produced by Tlbexp.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

AddThis Social Bookmark Button