将新团队添加到数据表时遇到问题。VisualStudio 指向带有 NullReference 错误的行 teams.Rows.Add(dr)。你能帮我么?
private void addTeam(String nazwa)
{
DataRow dr = players.NewRow();
//dr["playerID"] = nazwa;
dr["nazwa"] = nazwa;
teams.Rows.Add(dr); //<--there is en error
}
class Program
{
static DataTable players ;
static DataTable teams;
private DataSet teamMenager;
static void Main(string[] args)
{