What is the difference between eventOne (with keyword 'event') and eventTwo (w/o keyword)?
class Program
{
public event EventHandler eventOne;
public EventHandler eventTwo;
public void RaiseOne()
{
if (eventOne != null)
eventOne(this, EventArgs.Empty);
}
public void RaiseTwo()
{
if (eventTwo != null)
eventTwo(this, EventArgs.Empty);
}
static void Main(string[] args)
{
var p = new Program();
p.eventOne += (s, e) => Console.WriteLine("One");
p.eventTwo += (s, e) => Console.WriteLine("Two");
p.RaiseOne();
p.RaiseTwo();
}
}