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 8583473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:32:50+00:00 2026-06-11T21:32:50+00:00

I tried to search a bit before asking but I really had no idea

  • 0

I tried to search a bit before asking but I really had no idea what to search for on this one so here’s what I’m looking for:

I need a way to declare an object in VB.net so that I can set it to the current class(using the class as the object type) but if the class name changes then the object type changes to match the new class name. Here’s an example.

Class UhhWhat

Dim L As List(Of UhhWhat)

Sub add()

  L.Add(Me)

End Sub

End Class

So if this were my code and someone copied it to a new class with a different name say… “UhhNo” then I would want the “List(Of UhhWhat)” to change to “List(Of UhhNo)”.

Does that make sense? I’m not really stuck on having the name for the object type, I just want something that will function like the List object’s Of T but use the current class’ type rather than a type supplied to a subroutine.
I would like this done when the code is written, not at runtime because I need intellisense to continue to function for the new type.

Lastly, I do know that simply using “List(Of Object)” would help my problem.. however this will not work for intellisense and I have heard that declaring an object as “object” type is slower than if you declared it as a specific type.

To sum it up what I’m looking for is a way to change the object type to whatever the programmer changes the class name to, automatically.

Thx a bunch 🙂

–EDIT–
I found the solution I was looking for in a rather simple place.. the VS rename function.. ahh another time when the answer was so simple.

Kudos to David W for their patience with me, thx a bunch David W!
I hope i didn’t bug ya too much with my vague ideas 🙂
I appreciate the suggestions 🙂

  • 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-11T21:32:51+00:00Added an answer on June 11, 2026 at 9:32 pm

    In Solution Explorer, when you rename a class file, Visual Studio will fix the corresponding class names accordingly.

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

Sidebar

Related Questions

I've tried to search for a solution for this, but have had no joy:
Tried to search for this online and didn't get very far, so I'm asking
i tried to search this but was not able to get any proper help.I
I have tried to search for an answer in google, and this site, but
I've tried searching around for answers to this but I'm still a bit lost.
tried to search for this, although I am not even sure what I am
I tried to search SO but couldn't find close answers. What I have is
I tried to search for a JavaScript reference, but there's none available. The best
I tried to search and found this: Sort an array by a child array's
Okay, this one seems to me a bit weird. Any help would be greatly

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.