错误:system.console.write(string)是一个方法,但是类似于一个类型 [英] error: system.console.write (string) is a method but like a type
问题描述
使用System;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.Threading.Tasks;
名称空间方法
{
 课程计划
  {
      static void showMessage(string Param);
      {
      Console.Write("Hello Mr:"+ Param);
      }¥b $ b       static void Main(string [] args)
      {
          showMessage(" Khalid");
          console.readkey();
      }¥b $ b   }
}
删除第六个';'并更改为'Console.ReadKey'。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Methods
{
class Program
{
static void showMessage(string Param);
{
Console.Write("Hello Mr: "+ Param);
}
static void Main(string[] args)
{
showMessage("Khalid");
console.readkey();
}
}
}
Remove the sixth ‘;’ and also change to ‘Console.ReadKey’.
这篇关于错误:system.console.write(string)是一个方法,但是类似于一个类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!