Cannot Assign because it is a method group C#?

后端 未结 6 541
温柔的废话
温柔的废话 2021-01-01 17:02

Cannot Assign \"AppendText\" because it is a \"method group\".

public partial class Form1 : Form
{
    String text = \"\";

    public Form1()
    {
                 


        
6条回答
  •  误落风尘
    2021-01-01 17:52

    I figured out that the variable name declared was similar to a method name and hence it didn't allow me to assign a value.
    The moment I changed the name it worked!

提交回复
热议问题