c#错误CS0079事件只能出现在+ =或-=的左侧

时间:2019-05-15 15:49:06

标签: c#

我想制作一个线程栏滑块,用于编辑Form的大小...

我的错误:CS0079 C#事件只能出现在+ =或-=

的左侧
     private void trackBar1_ValueChanged(object sender, EventArgs e)
    {
        if (trackBar1.Value == 1)
        {
            if (trackBar1.MouseUp == true) // heres the error
            {
                Thread.Sleep(1000);
                this.Size = new Size(489, 76);
                Console.WriteLine("Value changed to  1");
            }
        }
        else if (trackBar1.Value == 2)
        {
            if (trackBar1.MouseUp == true) // heres the error
            {
                this.Size = new Size(589, 176);
                Console.WriteLine("Value changed to  2");
            }
        }
        else if (trackBar1.Value == 3)
        {
            if (trackBar1.MouseUp == true) // heres the error
            {
            Thread.Sleep(1000);
            this.Size = new Size(689, 276);
            Console.WriteLine("Value changed to  3");
            }
        }
    }

CS0079 C#事件只能出现在+ =或-=

的左侧

0 个答案:

没有答案