Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RD needs an inspection for multiple late-bound calls to Variant/Object types #2250

Open
ThunderFrame opened this issue Sep 20, 2016 · 0 comments
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections

Comments

@ThunderFrame
Copy link
Member

As per MSDN:

If you're going to invoke more than one property or method of an object in a collection, copy the object reference to a strongly typed object variable first. Using an object reference while it's still in a collection is slower than using it after placing it in a strongly typed object variable (for example, Dim woCurrent As WorkOrder), because the Collection object stores items in Variants. Object references in Variants are always late bound.

Invoking >1 members of a Collection's Item Object would be just one example. Would need to deal with explicit use of Item and usages of the Default member syntax

Invoking >1 members of a Variant or Variant Array item (including Dictionary items) would be another.

Of course, a Type or Interface would need to be available/referenced, which isn't always the case.

@ThunderFrame ThunderFrame added this to the Future Versions milestone Sep 20, 2016
@Vogel612 Vogel612 added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. and removed feature-request labels Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections
Projects
None yet
Development

No branches or pull requests

2 participants