Skip to content

Enumerating the circular buffer does not produce anything #155

Description

@asm2025

After adding some random items to the circular buffer, using foreach or any function to enumerate the buffer does not produce anything

Here is a sample code:

`int[] values = new int[20];
Random rnd = new Random();

for (int i = 0; i < values.Length; i++)
values[i] = rnd.Next(1, 99);

CircularBuffer buffer = new CircularBuffer(values.Length / 2);

Console.WriteLine(string.Join(", ", values));

foreach (int value in values)
buffer.Add(value);

Console.WriteLine(string.Join(", ", buffer));

Console.ReadKey();`

Expected behavior
2 lines should be printed: 1 for the array content joined by ',' and another line for the content of the buffer joined by ','

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions