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 Object type represents one of JavaScript's data types. It is used to store various keyed collections and more complex entities. Objects can be created using the Object() constructor or the object initializer / literal syntax.
1 : something material that may be perceived by the senses. 2 : something mental or physical toward which thought, feeling, or action is directed. object. noun.
[object Object] is a string version of an object instance. This value is returned by a JavaScript program if you try to print out an object without first formatting the object as a string. It's no wonder developers get confused about this object: there are no error messages or warnings that tell us what is going on.
Description. Object. keys() returns an array whose elements are strings corresponding to the enumerable properties found directly upon object . The ordering of the properties is the same as that given by looping over the properties of the object manually.
Everyone answered "What does this mean?" but nobody answered "Is it useful?"
In most cases, the answer is No. You should not use this.
There are a few special exceptions. Off the top of my head:
class
.The @
sign can be thought of as "escape" character of sorts. Since object
is 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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With