I’ve been playing around with events and delegates and need to raise my event asynchronously, thus I’ve been using:
public event EventHandler OnHelloEvent;
public void Raise()
{
IAsyncResult syncResult = OnHelloEvent.BeginInvoke(this, new EventArgs(), null, null)
In Intellisense, the last null is stated to be object @object. I haven’t come across this before and can’t seem to find any documentation for it.
What does this mean? Is it useful?
The
@sign can be thought of as “escape” character of sorts. Sinceobjectis a keyword in C#, you cannot use it as a variable name. However prefix it with an@character and it no longer is a keyword, just a valid variable name!