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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:43:01+00:00 2026-06-13T17:43:01+00:00

Here is my scenario. I have the following line of code in my program:

  • 0

Here is my scenario.

I have the following line of code in my program:

JCL_History.Enqueue(JCL_History(I))

This JCL_History object is basically a Generic.List encapsulated in a wrapper and has the following method:

Public Sub Enqueue(ByRef value As String)
    If Members.Contains(value) Then
        Me.RemoveAt(Members.IndexOf(value))
    ElseIf _Count = _MaxCount Then
        Me.RemoveAt(_Count - 1)
    End If
    Me.Insert(0, value)
End Sub

So you see that the first line of code that invokes Enqueue should “shuffle” items around.

Also, the wrapper class of which JCL_History is a type has the following default property:

Default Public Property Item(ByVal Index As Integer) As String 'Implements Generic.IList(Of String).Item
    Get
        If Index < _MaxCount Then
            Return Members(Index)
        Else
            Throw New IndexOutOfRangeException("Bug encountered while accessing job command file history, please send an error report.")
        End If
    End Get
    Set(ByVal value As String)
        If Index < _MaxCount Then
            If Index = _Count Then _Count = _Count + 1
            Members(Index) = value
        Else
            Throw New IndexOutOfRangeException("Bug encountered while accessing job command file history, please send an error report.")
        End If
    End Set
End Property

In my testing I have 2 items in this JCL_History list. When I call that first line of code I posted (the one that invokes Enqueue) with I = 1 I expect the first item to be shuffled to the bottom and the second item to be shuffled to the top.

After the thread returns from Enqueue I notice that this is exactly what happens to my list, HOWEVER if I hit the “step_in” button after the execution of Enqueue I go into the Default Property’s set method where Index = 1 and value = and it screws everything up, because the item that got shuffled to the end (index 1) gets overwritten by the item value shuffled to the top.

So basically the set method on the default property is getting called at what I think to be a completely ridiculous time. What gives? By the way I’m running VS2005 on XP.

  • 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-13T17:43:02+00:00Added an answer on June 13, 2026 at 5:43 pm

    No answer. Never fixed this, just worked around it.

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

Sidebar

Related Questions

Here is the scenario: I have an object called a Transaction that needs to
I have the following scenario : A Flex 3 DataGrid is sitting here At
Here is the scenario: I have a directory with 2+ million files. The code
I have following scenario: I have a XML-Document, e.g. like this <someRootElement> <tag1> <tag2
Here's the scenario: I have a program that contains an annotation that I built
Here is my scenario: I have the following menu created from a viewModel <ul>
Basically I have been tasked with tackling the following scenario: When you are designing
Here is the scenario. I have a WCF service, when this service is called
Here is my scenario: I have two MySQL tables: Categories (columns: id, category) Items
Here's the scenario: I have a public repo A . Bob forks A ,

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.