E
Ed
Hi, dear all,
Here are some questions when I was writing CLI code, which would be
used by C# Project.
1. Reference Parameter
If CLI method have % reference type parameter, which is ref class,
could C Sharp use it?
In CLI code:
ClassA::SetB(ClassB% classB);
In CSharp:
ClassA classA=new ClassA();
ClassB classB=new ClassB();
classA.SetB(ref classB);
// But the build was failed:
// error CS1501: No overload for method 'SetB' takes '2' arguments
So, how can I use this CLI method in CSharp project?
Here are some questions when I was writing CLI code, which would be
used by C# Project.
1. Reference Parameter
If CLI method have % reference type parameter, which is ref class,
could C Sharp use it?
In CLI code:
ClassA::SetB(ClassB% classB);
In CSharp:
ClassA classA=new ClassA();
ClassB classB=new ClassB();
classA.SetB(ref classB);
// But the build was failed:
// error CS1501: No overload for method 'SetB' takes '2' arguments
So, how can I use this CLI method in CSharp project?