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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:08:17+00:00 2026-05-26T04:08:17+00:00

I am trying to build a controls object to better build my forms. Beneath,

  • 0

I am trying to build a controls object to better build my forms.

Beneath, 1 object that inherits from a certain type and 1 object that is defined as a certain type.

Can you please tell me when to use ControlsCollection1 and ControlsCollection2 and why not to use a particular one. The difference between them? When do I create an object that inherits from an existing object and when do I create a object as an object of a certain type?

Second Question, Is a Collection better that a List?

I am still learning, so I hope this makes sense.

Public Class ControlsCollection1

    Private _controls As List(Of TextBox)
    Private _textbox As TextBox

    Public Sub New(ByVal textbox As TextBox)
        Me._textbox = textbox
    End Sub

    Public Property Textbox() As TextBox
        Get
            Return _textbox
        End Get
        Set(ByVal value As TextBox)
            _textbox = value
        End Set
    End Property

End Class

Public Class ControlsCollection2
    Inherits List(Of TextBox)



End Class

calling class:

Dim col1 As New ControlsCollection1(New TextBox)


Dim col2 As New ControlsCollection2

col2.Add(New TextBox)
  • 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-26T04:08:18+00:00Added an answer on May 26, 2026 at 4:08 am

    Inheritance is a way to reuse code of existing objects, establish a subtype from an existing object, or both, depending upon programming language support. In classical inheritance where objects are defined by classes, classes can inherit attributes and behavior (i.e., previously coded algorithms associated with a class) from pre-existing classes called base classes or superclasses or parent classes or ancestor classes. The new classes are known as derived classes or subclasses or child classes. The relationships of classes through inheritance gives rise to a hierarchy. In prototype-based programming, objects can be defined directly from other objects without the need to define any classes, in which case this feature is called differential inheritance.
    In Short (DRY) Don’t Repeat Yourself principle.

    A List is a Collection. It is a specialized Collection, however.

    A Collection is just that: a collection of items. You can add stuff, remove stuff, iterate over stuff and query how much stuff is in there.

    A List adds the information about a defined sequence of stuff to it: You can get the element at position n, you can add an element at position n, you can remove the element at position n.

    In a Collection you can’t do that: “the 5th element in this collection” isn’t defined, because there is no defined order.

    There are other specialized Collections as well, for example a Set which adds the feature that it will never contain the same element twice.

    So your code makes no sense re design it after u read this and understand it…
    second dont add questions that are duplicates in stackoverflow
    Third use google alot in ur career cause it will give u fast answers.
    fourth Mark this as answer if u got ur answer:)
    goodluck

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

Sidebar

Related Questions

I am trying to build a library of silverlight controls where the client can
I'm trying to build some .ascx controls into a class library for plugins for
I'm trying to build a control logic that depends on the current gsp page
I'm trying build a method which returns the shortest path from one node to
I'm trying to build my own custom control for a windows forms application in
I'm trying to build an ASP.net user control that uses a Repeater to iterate
I'm trying to build a custom control in ASP.NET MVC. The thing that I
I'm trying to create a composite ASP.NET control that let's you build an editable
Trying to build my own user control: <%@ Control Language=C# AutoEventWireup=true CodeFile=TabMenu.ascx.cs Inherits=TabMenu %>
I'm trying to build a web application that let the administrator talk to the

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.