I am getting error
the modifier public is not valid for this item
this my code, please help me.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class First : System.Web.UI.Page,test
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = test1("Hi", 1).ToString();
}
}
public class Base
{
public int test1(int x)
{
return x;
}
public string test1(string x)
{
return x;
}
public string test1(string x, int y)
{
return x + y;
}
}
public interface test
{
public int test1(int x);
public string test1(string x);
public string test1(string x, int y);
}
Thanks,
Pradeep
Your interface declaration should look like this:
Access modifiers are not valid on interface declarations: