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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:20:26+00:00 2026-05-23T01:20:26+00:00

I am new to vb.net in visual studio 2010. I notice in the existing

  • 0

I am new to vb.net in visual studio 2010. I notice in the existing project, it has a sub defined as follows:

Public Sub SelectItem(ByVal **TabPage** As TabPage)
    For Each T As TabPage In TabPages
        T.IsSelected = False
    Next
    If **TabPage**  IsNot Nothing Then
        For Each t As TabPage In TabPages
            If m_TabsDirection = FlowDirection.LeftToRight Then t.SendToBack() Else t.BringToFront()
        Next
    End If
    End sub

If I understand right, the TabPage surrounded by ** is a variable and the regular Tabpage is a type. But is it legal to define variable in this way? I think in c/c++, it is illegal to define something like int int.

Even if it is legal, is it common that people define variables in this way in vb.net?

  • 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-23T01:20:26+00:00Added an answer on May 23, 2026 at 1:20 am

    Yes it’s legal and I’ve seen it on more than one occasion.

    I think it’s probably more common in VB.NET than C#, since C# it would normally be tabPage since it’s case sensitive.

    As a best practice I don’t do it because it can cause confusion when reading the code. It’s easy to figure out that you’re passing around an instance of an object, but using currentTab is also easy to understand.

    So, Legal: Yes

    Advisable: No

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

Sidebar

Related Questions

When I create a new ASP.NET project in Visual Studio 2010, it creates the
If I create a brand new Website project using Visual Studio 2010 dot net
I'm currently working in Visual Studio 2010. MVC3 project. I'm new to .NET MVC
In Visual Studio 2010, when you say new Item, you can see Asp.NET Handler
I'm trying to start a new ASP.NET Web Application Project using Visual Studio 2008.
Visual Studio 2010 - C# - MVC3 I am completely new to ASP.Net and
So brand new installation of .NET Framework 4.0 and Visual Studio 2010 on a
I am writing a project in asp.net C# using Visual Studio 2010. I want
I am NEW in jQuery and I am using Visual Studio 2010 ASP.NET Pages
I'm trying to make a new ASP.NET MVC2 web site project, in Visual Studio

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.