Yes, that's right. That's a possibility - it works, I've just testet it
Thanks a lot :-
It's correct, though, that there is no possibility to fetch reference parameters from J#, right
/Mads
> It's correct, though, that there is no possibility to fetch reference parameters from J#, right?
Yes, as far as I know. Java can't do that. I have seen MSFT programmers
talking about a /** @Ref */, but I have never seen any examples in .net 1.0
or 1.1. (Maybe J# 1.2 will include this?)
Lars-Inge T?nnessen
www.larsinge.com
Bob LaCasse [MSFT] - 23 Apr 2004 01:11 GMT
Hi - You are allowed to pass J# parameters to byref methods. There is no
special syntax. The change will be reflected in the caller. What you
can't do, at least not yet, is define byref method parameters in J#.
For example, the output of the following psuedo code would be 10, not 0,
but the reverse would not work because you can't define the method in J# as
taking the param byref. You would not see the change in the caller with a
C# caller to J# method.
J#:
{
int data = 0;
ReturnByRef(data);
System.out.println(data);
}
C#:
public void ReturnByRef(ref int data)
{
data = 10;
}
| > It's correct, though, that there is no possibility to fetch reference
| parameters from J#, right?
[quoted text clipped - 5 lines]
| Lars-Inge T?nnessen
| www.larsinge.com
Lars-Inge T?nnessen - 23 Apr 2004 18:18 GMT
And in Managed C++: =:o)
void ReturnByRef( int __gc *data )
{
*data = 10;
};
I'm really looking forward to the next release of J# VS. Looks like you have
included everything we have been waiting for.
Lars-Inge T?nnessen
www.larsinge.com