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

  • SEARCH
  • Home
  • 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 4586664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:40:15+00:00 2026-05-21T21:40:15+00:00

Okay, I am TOTALLY confused here. I have a class… say MyClass . It

  • 0

Okay, I am TOTALLY confused here. I have a class… say MyClass. It has several properties of another class of my type, say MyHelperClass (along with other properties).

I am doing the following:

Dim inst As MyClass = New MyClass() With {
    .p1 = sv1, 
    .p2 = sv2, 
    .h1 = getHelperClass(a1), 
    .p3 = sv3, 
    .p4 = sv4, 
    .h2 = getHelperClass(a2), 
    .p5 = sv5, 
    ...
    .pN = svN
}

*where .p# is some property, .sv# is some valid value. .h# is a property of type MyHelperClass and getHelperClass(a#) returns an instance of said class.

Now, I have the odd thing here, where the assignment statement for h1 works perfect. No problems. The assignment statement for h2 however, it is giving me the following blue-squiggle error:

Operator '=' is not defined for types myLib.MyHelperClass and myLib.MyHelperClass.

I just do not get this error at all! I don’t even know where to start to figure this out. HELP!

201105.06 0305:
The signature for h1’s type is List(Of myLib.Address), where Address is a very basic class with typical address fields (name, address, city, state, zip, etc.). The return type of getHelperClass is also List(Of myLib.Address).

As SSS hinted at in his answer, I would expect = to not work in the “natural” way if I was using it for equality testing on a class without operators, however I am using it as an assignment operator, not equality, which I can’t see any problem with. I am expecting the result of getHelperClass to be assigned to h2. But instead it’s telling me = is not defined for the type. Is it possible that for some reason, the compiler is interpreting it as =(EQUALS) instead of =(ASSIGN)?

As for commenting out that line and it happening on the first one, I’ll need to wait till I’m back in the office tomorrow to check that. Will report back.

  • 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-05-21T21:40:15+00:00Added an answer on May 21, 2026 at 9:40 pm

    Ah, yeah, sorry didn’t read your OP properly. The assignment must be being misinterpreted as an comparison. Maybe you are missing a comma? For example in the statement “a = b = c” the first equals sign is an assignment, the second is a comparison.

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

Sidebar

Related Questions

Okay, I have GOT to be missing something totally rudimentary here. I have an
Okay I'm totally confused on this one. I have a script that receives a
okay... How do I explain this without being totally confusing?... Alright, I have this
I am totally confused right now. Edit: Okay, nevermind. The Python socket as well
Okay, I feel totally stupid posting this. I am not sure if it is
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay this question is very simple: I have a facebook page, and a website.
Okay, I have the following create action #posts_controller, nested resource under discussions def create
Okay, so I have my post.php page. If you are not logged in, you'll
Okay - I have a dilemma. So far my script converts page titles into

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.