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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:24:07+00:00 2026-06-01T17:24:07+00:00

I noticed in the code base I have to read that sometimes property definition

  • 0

I noticed in the code base I have to read that sometimes property definition includes an empty (). What’s the meaning of that? And it has nothing to do with arrays.

For example :

Public Property TotalPages() As Integer
  • 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-01T17:24:09+00:00Added an answer on June 1, 2026 at 5:24 pm

    I know it seems strange (well to us C#’ers) but properties can have parameters in VB.NET.

    So you can have

    Public Class Student
        Private ReadOnly _scores(9) As Integer
    
        ' An indexed Score property
        Public Property Score(ByVal index As Integer) As _
            Integer
            Get
                Return _scores(index)
            End Get
            Set(ByVal value As Integer)
                _scores(index) = value
            End Set
        End Property
    
        Private _score As Integer
    
        ' A straightforward property
        Public Property Score() As _
            Integer
            Get
                Return _score
            End Get
            Set(ByVal value As Integer)
                _score = value
            End Set
        End Property
    
    End Class
    
    Public Class Test
        Public Sub Test()
    
            Dim s As New Student
    
            ' use an indexed property
            s.Score(1) = 1
    
            ' using a standard property   
            ' these two lines are equivalent
            s.Score() = 1
            s.Score = 1
    
        End Sub
    End Class
    

    So your declaration of

    Public Property TotalPages() As Integer
    

    Is a straightforward non-indexed property, e.g. with no parameters.

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

Sidebar

Related Questions

I am reading cpython code for python 3k and I have noticed, that __missing__
I have recently read Mike McShaffry's Game Coding Complete and noticed the code style
I have a base class ReportElement which has type property: public abstract class ReportElement
I've noticed that my code errors out on sqlWrite.ExecuteNonQuery(); after executing 200 Insert queries
I looked through some code and noticed that the convention was to turn pointer
I've been working with somebody else's code and noticed that on all uses of
I am using SampleGrabber in DirectShow on windows 7, I noticed that the Code
I noticed in the Java 6 source code for String that hashCode only caches
I just started using Qt and noticed that in each example code folder there
I noticed when I have [Serializable] instead of [Serializable()] , the code still compiles.

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.