Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:51:37+00:00 2026-06-07T11:51:37+00:00

I have a class object A that I want to objectify/represent using target .

  • 0

I have a class object “A” that I want to objectify/represent using target. I can accomplish this by the following code (visual basic):

dim target : target = A

Now, if the object A has a property, for example, a0, I can access this property by

target.a0

However, if now I have another class object B, and its property is b0 instead of a0, I have to manually access this property by changing the target first and then access its property as following:

dim target : target = B
target.b0

What I want to accomplish is to objectify the a0 and b0 using another target-like representation. If possible, this is similar to what I am going after:

dim target1 : target1 = A
dim target2 : target2 = a0
target1.target2

I know this doesn’t work, because VB didn’t really think target1 is a keyword like target. Could anyone provide a good solution?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:51:39+00:00Added an answer on June 7, 2026 at 11:51 am

    Based on my understanding of what you’re trying to accomplish (which may be a bold assumption on my part), you can’t do what you’re trying to do. Assuming this is all VB.NET, the declaration of “Dim target2” is completely dissimilar from the reference to a property or method reference as you offer in “target1.target2”. In the latter instance, “.target2” has to be a property or method of the type of which target1 was declared. The direct declaration I think you’re trying to accomplish just isn’t the way the language is constructed.

    You could probably pull off some syntax tricks to approach what this does, but in terms of making “target1.target2” resolve to a literal reference to “A.a0” in a declarative manner such as that just won’t work.

    If I’ve misunderstood, I’ll offer apologies in advance.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a Javascript class/object that allow me to have various method:
We have the Class object (an object that reference a Class) so you can
I have a wrapper class around some objects that I want to use as
I have a class that I want to contain multiple objects of something I
I have an Employee class object that I am calling from my Login.aspx page's
I have a list of class object that I created as a variable in
Assume that I have a particular class of object that defines a class method
I have a class that spawns an arbitrary number of worker object that compute
I have a class constructor that expects a reference to another class object to
I have a class that overloads object attribute access by returning the attributes of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.