Click here to Skip to main content
11,924,280 members (55,410 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# CLI
Anyone knows why methods from a ref class written in CLI actually get "remodeled" when you import the dll in c# ?
ManagedFoo FOONET::ManagedFoo::divide(ManagedFoo % ac_OtherFoo)
gets changed in :
void divide(ref FOONET.ManagedFoo value, FOONET.ManagedFoo ac_OtherFoo)

the first is in my wrapper class and after that I compile a dll and when I import the dll in C# I get the second...I am lost...
Posted 21-Mar-12 4:50am
SAKryukov 21-Mar-12 16:02pm
Not clear. "Gets changes" by what?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I guess that is due to the language interoperability.I believe that the first one is written in C++ style,so when it comes to C# style of passing parameters it changes accordingly
m0rTu 21-Mar-12 11:46am
ok...i kind of get that...but how do I actually call that function ? and actually get a ManagedFoo instance back ?
Sastry_kunapuli 3-Apr-12 10:05am
You have to pass the native types into that .So you have to write a little bit of un-managed code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151125.3 | Last Updated 21 Mar 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100