changeobject是方法名..仅此而已

解决方案 »

  1.   

    是一个返回类型为anotherclass 类型的方法
      

  2.   

    是的,不过没有ref也是
    因为对象参数传递的就是指针private void Test(Button AButton)
    {
        AButton.Text = "Test";
    }private void button1_Click(object sender, EventArgs e)
    {
        Test(button1);
    }
    //效果一样
    private void Test(ref Button AButton)
    {
        AButton.Text = "Test";
    }private void button1_Click(object sender, EventArgs e)
    {
        Test(ref button1);
    }
      

  3.   

    先谢谢楼上几位的回答
    anotherclass是类的名称吧
    可以把它做为函数的返回类型吗?我对这点不是很了解 能麻烦说详细点吗
    然后这个函数return的是 anotherclass类的一个对象 是不是代表这个呢?
      

  4.   

    是一个返回类型为anotherclass 类型的方法
      

  5.   

    先谢谢楼上几位的回答
    anotherclass是类的名称吧
    可以把它做为函数的返回类型吗?我对这点不是很了解 能麻烦说详细点吗
    ================================================================
    当然可以,要不我们还用面向对象干什么?函数能返回值类型,也能返回引用类型。而类是引用类型的一种
    然后这个函数return的是 anotherclass类的一个对象 是不是代表这个呢?
    ==================================================================
    Y
      

  6.   

    anotherclass是你的自定义类的名称,
    当然可以作为返回类型。这就是所谓用户自定义类,OOP三要素之一。
    建议去读《Beginning C# Objects form Concepts to Code》