What does putting an exclamation point (!) in front of an object reference variable do?

It is almost certainly a statement inside a With block.

It is almost certainly a statement inside a With block: With blah!RelativePath. Value = mstrRelativePath End With which is syntax sugar for blah("RelativePath"). Value = mstrRelativePath which is syntax sugar for blah.

DefaultProperty("RelativePath"). Value = mstrRelativePath where "DefaultProperty" is a property with dispid zero that's indexed by a string.

In your answer you said, "which is syntax sugar for". Is it only syntax sugar? I'm wondering if perhaps it might help speed up runtime of the application as well or are there other side effects with using a!

Instead of writing out all of the code. – Ben McCormack Mar 4 '10 at 1:15 No, the exact same code gets generated. – Hans Passant Mar 4 '10 at 2:04.

The exclamation point is acting as a member access operator it seems... Member Access Operators To access a member of a type, you use the dot (.) or exclamation point (!) operator I take that back. It is this: Exclamation Point (!) Operator Use the! Operator only on a class or interface as a dictionary access operator.

The class or interface must have a default property that accepts a single String argument. The identifier immediately following the! Operator becomes the string argument to the default property.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions