The compiler is telling you the problem - MyCall is less accessible
than SomeCall.  MyCall is not public, so it is not accessible to the
outside world, and SomeCall is.  Other assemblies won't know how to
handle an event unless they can see the corresponding delegate.

On Sep 17, 3:32 am, asit <[EMAIL PROTECTED]> wrote:
> namespace ChatServer351
> {
>     class MyEventArgs : EventArgs
>     {
>         public int x, y;
>     }
>
>     delegate void MyCall(object source, MyEventArgs args);
>
>     public partial class Form1 : Form
>     {
>         public event MyCall SomeCall;
>
>         public Form1()
>         {
>             InitializeComponent();
>         }
>
>         private void Form1_Load(object sender, EventArgs e)
>         {
>             textBox1.Text = "13000";
>             textBox2.Text = "10";
>             this.ActiveControl = button1;
>
>         }
>
>         private void button1_Click(object sender, EventArgs e)
>         {
>             MainThread ob = new MainThread(100, 10);
>
>         }
>
>         public void OnSomeCall()
>         {
>             MyEventArgs arg = new MyEventArgs();
>             arg.x = Convert.ToInt32(textBox1.Text);
>             arg.y = Convert.ToInt32(textBox2.Text);
>             if (SomeCall != null)
>                 SomeCall(this, arg);
>         }
>     }
>
> }
>
> To best of my knowledge, I have coded as per the norms. But why it
> shows inconsistent accessibility error ????
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to