Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass By Reference in C#
#5
Need BSTR.

Macro Macro2527
Code:
Copy      Help
out
int a=1
str b="one"
out F"a={a}, b={b}"
CsScript x.AddCode("")
IDispatch d=x.CreateObject("Test")
BSTR _b=b
d.PassByRef(&a &_b)
b=_b
out F"a={a}, b={b}"

#ret
using System;

public class Test
{
,public void PassByRef(ref int x, ref string y)
,{
,,x = 100;
,,y = "two";
,}
}


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)