Hi Dick,
The rule is simple:
- In all cases when you access an instance member, then you need to use the colon (just like in VO). Instance members are when you use a local, or an iVar etc to access something, like oMyLocal:SomeMethod(), oDataWin:Owner:Caption etc
- In all cases when you access a static member of a class, then you need to use the dot. We did not have static members in VO at all, while in .Net it's generally this: ClassName.SomeStaticMember, like for example Application.EnableVisualStyles(), where Application is a class/type, while EnableVisualStyles() is a static method of that type.
Also when you access (with a dot) a static member of a class, then this gives you an instance of some other object, which you need to then access with a colon. For example in this code:
Code: Select all
? Application.ExecutablePath:Length
We are using the static member "ExecutablePath" of the type "Application", so we need to use the dot. This returns a string (instance of the String type), so we then need to use the colon (as in VO), to access it's property named "Length" to get the size of the string.
.