错误1程序“c:...Project6\Project6\obj\x86\Debug\Project6.exe”不包含适合于入口点的静态“Main”方法 10
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespa...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ClassLibrary
{
public class IndexerClass
{
public IndexerClass()
{
}
public int String(string key, string x)
{
string[] ch;
string[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public int String(char key, string x)
{
string[] ch;
char[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public int String(int key, string x)
{
string[] ch;
int[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public void search(string key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public void search(char key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public void search(int key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public static void Main(string[] args)
// public static void Main()
{
int[] key = new int[2];
for (int i = 0; i < key.Length; i++)
{
key[i] = i + 1;
}
string[] string1 = new string[2];
//for (int i = 0; i < string1.Length; i++)
// {
stirng1[0] = "我是军";
string1[1] = "我是为";
// }
String(key, string1);
search(1);
// System.Console.WriteLine(stringCollection[0]);
}
}
}
我这里明明有了main()方法,为什么还提示我没有呢???? 展开
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ClassLibrary
{
public class IndexerClass
{
public IndexerClass()
{
}
public int String(string key, string x)
{
string[] ch;
string[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public int String(char key, string x)
{
string[] ch;
char[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public int String(int key, string x)
{
string[] ch;
int[] chKey;
while (key != NULL)
{
i = 0;
chKey[i] = key;
ch[i] = x;
i++;
}
return i - 1;
}
public void search(string key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public void search(char key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public void search(int key)
{
int num;
String();
num = String();
for (int j = 0; j < num; j++)
{
if (chKey[j].Equal(key))
{
break;
}
}
System.Console.WriteLine(ch[j]);
}
public static void Main(string[] args)
// public static void Main()
{
int[] key = new int[2];
for (int i = 0; i < key.Length; i++)
{
key[i] = i + 1;
}
string[] string1 = new string[2];
//for (int i = 0; i < string1.Length; i++)
// {
stirng1[0] = "我是军";
string1[1] = "我是为";
// }
String(key, string1);
search(1);
// System.Console.WriteLine(stringCollection[0]);
}
}
}
我这里明明有了main()方法,为什么还提示我没有呢???? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询