コード例 #1
0
    public static var varios(var param, bool cond1, bool cond2)
    {
        var local = param;
        var toRet;

        if (cond1)
        {
            local = param = new ClassA();
        }
        else
        {
            if (cond2)
            {
                local = param = true;
            }
            //local = param = new ClassC();
            else
            {
                local = param = new ClassB();
            }
        }

        toRet = ParamLocal.Write(local, param);

        return(toRet);
    }
コード例 #2
0
    public static var varios(var param, bool cond1, bool cond2)
    {
        var local = param;
        var toRet;

        if (cond1)
        {
            local = param = 2.2;
        }
        else
        {
            if (cond2)
            {
                local = param = "1.5";
            }
            else
            {
                local = param = 5;
            }
        }

        //ParamLocal.Write(local);
        toRet = ParamLocal.Write(param);

        return(toRet);
    }
コード例 #3
0
    public static void varios(var param, bool cond)
    {
        var local = param;

        if (cond)
        {
            local = param = 2.2;
        }
        else
        {
            local = param = "1.5";
        }

        ParamLocal.Write(local, param);
    }
コード例 #4
0
    public static void varios(var param, bool cond1, bool cond2)
    {
        var local = param;

        if (cond1)
        {
            local = param = new ClassA();
        }
        else
        {
            if (cond2)
            {
                local = param = true;
            }
            else
            {
                local = param = new ClassB();
            }
        }

        ParamLocal.Write(local, param);
    }
コード例 #5
0
    public static void varios(var param, bool cond1, bool cond2)
    {
        var local = param;

        if (cond1)
        {
            local = param = new StreamWriter("pp.txt");
        }
        else
        {
            if (cond2)
            {
                local = param = new ArrayList();
            }
            else
            {
                local = param = new StringWriter();
            }
        }

        ParamLocal.Write(local, param);
    }
コード例 #6
0
    public static var varios(var param, bool cond1, bool cond2)
    {
        var local = param;

        if (cond1)
        {
            local = param = 2.2;
        }
        else
        {
            if (cond2)
            {
                local = param = "1.5";
            }
            else
            {
                local = param = 5;
            }
        }

        ParamLocal.Write(param);
        return(ParamLocal.Write(local));
    }