我是个新手,刚学C#,有些问题提的比较幼稚,希望大家见谅!
using System;
using System.Collections.Generic;
using System.Text;
namespace baimisaipao
{
class Program
{
public struct Men
{
string num;
double grade;
}
static void Main(string[] args)
{
Man [ ]a=new Men{{"001","13.6"},{"002","14.8"},{"010","12.0"},{"011","12.0"},
{"023","15.6"},{"025","13.4"},{"031","14.9"},{"036","12.6"},{"037","13.4"},{"102","12.5"},{"325","15.3"},{"438","12.7"}};
Man temp;
for(int i=0;i<12;i++)
for(int j=0;j<12;j++)
{ double temp;
if(a[i].grade>a[i+1].grade)
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
for(int i=1;i<13;i++)
Console.WriteLine("第{0}名是{1}选手,他的成绩是{2}",i,a[i-1].num,a[i-1].grade);
}
}
}
报错说:1.找不到类型或命名空间称“ Men”;
帮我看看,并且改下,谢谢!!!