Hello!!
I don't use C++/CLI I useVS2003 which is managed code.
This GetAllPostNames is an interface so I declared this GetAllPostNames in
this way
System::Collections::ArrayList* GetAllPostNames(ref int index);
and the C# method in this way public ArrayList GetAllPostNames(ref int
stdSopIndex)
This cause a compile error saying syntax error identifier ref.
If I instead declare the interface GetAllPostNames in this way
System::Collections::ArrayList* GetAllPostNames(int index);
and keep and the C# method in this way public ArrayList GetAllPostNames(ref
int stdSopIndex)
I get this compile error.
C:\PK\Development\Products\UTCAS\4.0\SRC\MeltPracA pplication\Dialog\ActionFo
rm.cs(16): 'MeltPracAppl.ActionForm' does not implement interface member
'MeltPracCommon.IMeltPracDialog.GetAllPostNames(in t)'
What is it that I don't do right?
Can you give me any hint about what I can do to make it work.
//Tony
"Bruno van Dooren" <br**********************@hotmail.com> skrev i
meddelandet news:#G**************@TK2MSFTNGP03.phx.gbl...
Assume I have an C++.net function called loadPostNames see below.
loadPostNames( dialog->GetAllPostNames(index) );
This function loadPostNames have GetAllPostNames(index) as a parameter.
Function GetAllPostNames is a method in C#.
Now to my question this identifier index passed as a parameter to method
GetAllPostNames is changed in
C# I want to be able to get the new changed value back to the C++.Net
function..
I have tried several possibilitys but I get compile error.
How should I write?
You C# method that takes the int should use the ref keyword.
Method(ref int i);
Your C++ call does not have to change if you are using C++/CLI.
See here for an example:
http://www.winterdom.com/cppclifaq/archives/000421.html
--
Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"