M
Mathijs
Hi group,
I have a class (TheClass) with static methods from an external DDL.
private void Test(ref byte param)
{
byte a = 0, b = 0;
param = 1;
TheClass.CallToDLLFunction(ref a, ref b);
param = 2;
}
private void Test2(ref byte param)
{
byte a = 0, b = 0;
param = 1;
TheClass.CallToOtherDLLFunction(ref a, ref b);
param = 2;
}
....
v=0
Test(ref v)
// v = 2, as expected
Test2(ref v)
// v = 1. There is no exception thrown
....
------------
I don't understand how a extern function can have any influence on the
assignment of the ref parameters.
Can someone explain this behaviour, please?
Thanks.
I have a class (TheClass) with static methods from an external DDL.
private void Test(ref byte param)
{
byte a = 0, b = 0;
param = 1;
TheClass.CallToDLLFunction(ref a, ref b);
param = 2;
}
private void Test2(ref byte param)
{
byte a = 0, b = 0;
param = 1;
TheClass.CallToOtherDLLFunction(ref a, ref b);
param = 2;
}
....
v=0
Test(ref v)
// v = 2, as expected
Test2(ref v)
// v = 1. There is no exception thrown
....
------------
I don't understand how a extern function can have any influence on the
assignment of the ref parameters.
Can someone explain this behaviour, please?
Thanks.