Not sure about the "2 arguments" message, but your CLI code should have a hat
in there if ClassB is a ref class:
e.g.,
ClassA::SetB(ClassB ^%classB);

Signature
David Anton
http://www.tangiblesoftwaresolutions.com
Convert between VB, C#, and C++
Instant C#
Instant VB
Instant C++
C++ to C# Converter
C++ to VB Converter
> Hi, dear all,
> Here are some questions when I was writing CLI code, which would be
[quoted text clipped - 18 lines]
>
> So, how can I use this CLI method in CSharp project?
Ben Voigt [C++ MVP] - 09 Aug 2007 15:28 GMT
> Not sure about the "2 arguments" message, but your CLI code should have a
> hat
> in there if ClassB is a ref class:
> e.g.,
> ClassA::SetB(ClassB ^%classB);
I think the original notation is also possible, C# will just ignore the
modopt() attribute.
I suggest using .NET Reflector to view the public API generated by the
compiler.
>> Hi, dear all,
>> Here are some questions when I was writing CLI code, which would be
[quoted text clipped - 18 lines]
>>
>> So, how can I use this CLI method in CSharp project?
Ed - 09 Aug 2007 17:50 GMT
> > Not sure about the "2 arguments" message, but your CLI code should have a
> > hat
[quoted text clipped - 40 lines]
>
> >> So, how can I use this CLI method in CSharp project?
Thank you!
I will have a try. And if "the public API generated by the compiler."
means the assembly code generated by compiler?
If so, it seems more and more tricks should be searched from the
assembly code generated by compiler.
Ben Voigt [C++ MVP] - 09 Aug 2007 18:52 GMT
> Thank you!
> I will have a try. And if "the public API generated by the compiler."
> means the assembly code generated by compiler?
.NET Reflector can show the signature of each method in any language,
including, for example, C#.
> If so, it seems more and more tricks should be searched from the
> assembly code generated by compiler.