Пример #1
0
    public void DoComplexOperation()
    {
        mObjectToTest.CallMe();

        string result = mObjectToTest.GetValue();

        int result2 = mObjectToTest.GetValueWithParams(new object[] { "ObjectArrayItem1", 5555 });

        int result3 = mObjectToTest.GetValueWithParams("Single String");

        float result4 = mObjectToTest.GetValueWithParams(223344, "Params Overload - works :)", "params", "keyword", "is", "fun");

        string result5 = mObjectToTest.GetValueWithParams("Kostas", "Two String Overload - works :)");

        string result6 = mObjectToTest.GetValueWithParams("Hello", 7654);

        string result7 = mObjectToTest.GetValueWithParams <string>("Generic Argument");

        double result8 = mObjectToTest.GetValueWithParams <double>(1234567);

        bool result9 = mObjectToTest.IsSomethingTrue;

        mObjectToTest.IsSomethingTrue = !mObjectToTest.IsSomethingTrue;

        bool result10 = mObjectToTest.IsSomethingTrue;

        mObjectToTest.CallMe();

        string result11 = mObjectToTest[32];

        mObjectToTest[65] = "passing value to indexer";

        Trace.WriteLine(
            $"DONE! Results: {result}, {result2}, {result3}, {result4}, {result5}, {result6}, {result7}, {result8}, {result9}, {result10}, {result11}");
    }