G
Guest
What is the right way to declare a static event handler?
I have a:
delegate void TestEvent(string ID, ref string payload);
namespace TestNS
{
public class TestFrm : System.Windows.Forms.Form
{
public static event TestEvent newEvent;
....
And this last line gives me compiler error CS0052: "Inconsistent
accessibility...."
I am trying to setup this class so I can add event handlers from other
(external) classes without reference to an instance of TestFrm.
Unfortunately, the MSDN explanation and additonal help at
http://msdn.microsoft.com/library/d...ml/vclrfRemarksOnUsingAccessibilityLevels.asp were not at all illuminating....
I have a:
delegate void TestEvent(string ID, ref string payload);
namespace TestNS
{
public class TestFrm : System.Windows.Forms.Form
{
public static event TestEvent newEvent;
....
And this last line gives me compiler error CS0052: "Inconsistent
accessibility...."
I am trying to setup this class so I can add event handlers from other
(external) classes without reference to an instance of TestFrm.
Unfortunately, the MSDN explanation and additonal help at
http://msdn.microsoft.com/library/d...ml/vclrfRemarksOnUsingAccessibilityLevels.asp were not at all illuminating....