Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
聊天包Windows窗体c#_C#_Chat - Fatal编程技术网

聊天包Windows窗体c#

聊天包Windows窗体c#,c#,chat,C#,Chat,我使用以下问题中的代码收到一个错误: 错误来自此部分: for (int x = 0; x < 20; x++) { messageControl1.Add(x.ToString("00") + ": Testing testing testing ...", MessageControl.BubblePositionEnum.Right); messageControl1.Add(x.ToString("00") + ": Testing with vari

我使用以下问题中的代码收到一个错误: 错误来自此部分:

for (int x = 0; x < 20; x++)
{
    messageControl1.Add(x.ToString("00") + ": Testing testing testing ...",
      MessageControl.BubblePositionEnum.Right);

    messageControl1.Add(x.ToString("00") + ": Testing with variable length strings.  This one is longer!", 
      MessageControl.BubblePositionEnum.Right);

    messageControl1.Add(x.ToString("00") + ": Testing is fun.", 
      MessageControl.BubblePositionEnum.Left);
}
for(int x=0;x<20;x++)
{
messageControl1.Add(x.ToString(“00”)+”:测试,
MessageControl.BubblePositionEnum.Right);
messageControl1.Add(x.ToString(“00”)+”:使用可变长度字符串进行测试。此字符串更长,
MessageControl.BubblePositionEnum.Right);
messageControl1.Add(x.ToString(“00”)+“:测试很有趣。”,
MessageControl.BubblePositionEnum.Left);
}

它在“添加””下面加了下划线。

问题出在哪里?它在“messageControl1”后面加了下划线“Add”,表示没有这样的操作:-(messageControl1的类型是什么?它是否应该有一个名为“Add”的成员,使用字符串和BubblePositionEnum?预期的行为是什么?因为它是FlowLayoutPanel。查看代码,此操作是将message bubble添加到屏幕上。