0

I am working in Asp.net 2010 C# Inside my web page,

public partial class NewStore : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    public class Item()
    {
       public int ItemID;
       public string ItemName;
    }
}

The Problem is that When I rebuild the Project then an error occurs 'The type 'NewStore' already contains a definion for 'Item'.

I didnt find any other class Item inside the Page... Will u please help me..

4

1 回答 1

2

Remove parenthesis after class name Item.

public class Item
{
   public int ItemID;
   public string ItemName;
}
于 2013-02-15T07:40:07.217 回答