Click here to Skip to main content
15,901,853 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch5-Feb-20 23:05
mvahoney the codewitch5-Feb-20 23:05 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
OriginalGriff5-Feb-20 23:19
mveOriginalGriff5-Feb-20 23:19 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch5-Feb-20 23:39
mvahoney the codewitch5-Feb-20 23:39 
AnswerRe: Need an opinion on a circular IList<T> implementation Pin
Sander Rossel5-Feb-20 23:27
professionalSander Rossel5-Feb-20 23:27 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch5-Feb-20 23:37
mvahoney the codewitch5-Feb-20 23:37 
AnswerRe: Need an opinion on a circular IList<T> implementation Pin
Arthur V. Ratz5-Feb-20 23:31
professionalArthur V. Ratz5-Feb-20 23:31 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch5-Feb-20 23:42
mvahoney the codewitch5-Feb-20 23:42 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Arthur V. Ratz5-Feb-20 23:51
professionalArthur V. Ratz5-Feb-20 23:51 
In this case, all that I would recommend is to write a specialization of the generic Queue<t> collection if it's good for your task, otherwise implement your own.

Specifically, first invoke, for example:

Queue<string> numbers = new Queue<string>();
numbers.Enqueue("one");
numbers.Enqueue("two");
numbers.Enqueue("three");
numbers.Enqueue("four");
numbers.Enqueue("five");


And then, implement some kind of push_front, push_back and pop_front, pop_back, as well as buffer shifting functionality to have an ability to perform circular ops. Smile | :)
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch5-Feb-20 23:56
mvahoney the codewitch5-Feb-20 23:56 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Arthur V. Ratz5-Feb-20 23:59
professionalArthur V. Ratz5-Feb-20 23:59 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch6-Feb-20 0:31
mvahoney the codewitch6-Feb-20 0:31 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Arthur V. Ratz6-Feb-20 0:34
professionalArthur V. Ratz6-Feb-20 0:34 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Arthur V. Ratz6-Feb-20 0:01
professionalArthur V. Ratz6-Feb-20 0:01 
AnswerRe: Need an opinion on a circular IList<T> implementation PinPopular
Slacker0076-Feb-20 1:16
professionalSlacker0076-Feb-20 1:16 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Pete O'Hanlon6-Feb-20 3:20
mvePete O'Hanlon6-Feb-20 3:20 
AnswerRe: Need an opinion on a circular IList<T> implementation Pin
Greg Utas6-Feb-20 1:54
professionalGreg Utas6-Feb-20 1:54 
AnswerRe: Need an opinion on a circular IList<T> implementation Pin
Pete O'Hanlon6-Feb-20 3:21
mvePete O'Hanlon6-Feb-20 3:21 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch6-Feb-20 3:28
mvahoney the codewitch6-Feb-20 3:28 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Pete O'Hanlon6-Feb-20 3:33
mvePete O'Hanlon6-Feb-20 3:33 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Greg Utas6-Feb-20 3:48
professionalGreg Utas6-Feb-20 3:48 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Pete O'Hanlon6-Feb-20 5:24
mvePete O'Hanlon6-Feb-20 5:24 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Gerry Schmitz6-Feb-20 8:06
mveGerry Schmitz6-Feb-20 8:06 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Jörgen Andersson6-Feb-20 20:50
professionalJörgen Andersson6-Feb-20 20:50 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
honey the codewitch6-Feb-20 21:40
mvahoney the codewitch6-Feb-20 21:40 
GeneralRe: Need an opinion on a circular IList<T> implementation Pin
Jörgen Andersson6-Feb-20 21:28
professionalJörgen Andersson6-Feb-20 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.