Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass By Reference in C#
#2
CsFunc doesn't.
Create object and call functions through IDispatch.

Macro Macro2527
Code:
Copy      Help
out
int a=1
int b=2
out "a=%i, b=%i" a b
CsScript x.AddCode("")
IDispatch d=x.CreateObject("Test")
d.PassByRef(&a &b)
err
,out _error.description
out "a=%i, b=%i" a b

#ret
using System;

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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)