@DJBMASTER
nope boxing isn't useful, as you only box the value itself, not the variable !
thus if you pass a boxed variable and change it, the variable itself won't change !

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dummyTest
{
    class Program
    {
        static void changeVariableValue(object i)
        {
            int bla = (int)i;   //unbox
            bla++;
        }

        static void Main(string[] args)
        {
            int bla = 30;
            changeVariableValue(bla);
            Console.WriteLine(bla);

            Console.ReadLine();
        }
    }
}



afaik the problem with ref is, as long as ref is active, the object can't be moved by the garbage collector (that doesn't imply deleting of the object, but just moving the object for better usage of memory). And like you said, when the function is out of scope, the variable in the object isn't fixed anymore and maybe somewhere else!

You're right with stackalloc, that's how the current Var object handles this situation!

@pararealist
i had a quick look at these two files, but unfortunately their concept of operator overloading won't work in c#, as it's not possible to overload the equals (=) operator in c# frown


@all
what do you think about the mentioned method to use double instead of var and lambdas when necessaray (in the special panel functions) - is it superior to the current concept, or has someone a suggestion for another solution to this problem ?
thanks in advance ^^


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread