Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Richard Deeming3-Oct-17 4:31
mveRichard Deeming3-Oct-17 4:31 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Kevin Marois3-Oct-17 5:33
professionalKevin Marois3-Oct-17 5:33 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Richard Deeming3-Oct-17 6:21
mveRichard Deeming3-Oct-17 6:21 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Nathan Minier4-Oct-17 1:54
professionalNathan Minier4-Oct-17 1:54 
QuestionFind Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 6:54
professionalKevin Marois2-Oct-17 6:54 
AnswerRe: Find Insert Position In An ObservableCollection Pin
Dave Kreskowiak2-Oct-17 7:14
mveDave Kreskowiak2-Oct-17 7:14 
GeneralRe: Find Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 7:21
professionalKevin Marois2-Oct-17 7:21 
GeneralRe: Find Insert Position In An ObservableCollection Pin
Dave Kreskowiak2-Oct-17 7:45
mveDave Kreskowiak2-Oct-17 7:45 
There's no such thing.

You would have to write the code to determine the insert location. The quick'n'dirty method would be to just for(index...) over the collection until you find the alphabetical position and then do an Insert(index, object) to insert into the collection. Keep in mind, this doesn't scale well. The larger the collection, the more expensive this operation becomes.

Really, if an alphabetical collection had to be maintained, I would probably write my own version of ObservableCollection and add the support to it along with b-tree support to keep the CPU workload down when inserting items.

But, I really wouldn't do that because a "sorted view" is the realm of the view of the collection, not of the collection itself.
System.ItDidntWorkException: Something didn't work as expected.

A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: Find Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 7:52
professionalKevin Marois2-Oct-17 7:52 
GeneralOT: bad link in your sig. Pin
OriginalGriff2-Oct-17 21:56
mveOriginalGriff2-Oct-17 21:56 
GeneralRe: OT: bad link in your sig. Pin
Dave Kreskowiak3-Oct-17 1:52
mveDave Kreskowiak3-Oct-17 1:52 
GeneralRe: OT: bad link in your sig. Pin
OriginalGriff3-Oct-17 2:20
mveOriginalGriff3-Oct-17 2:20 
AnswerRe: Find Insert Position In An ObservableCollection Pin
Alaa Ben Fatma3-Oct-17 10:27
professionalAlaa Ben Fatma3-Oct-17 10:27 
SuggestionUse design patterns in the 15 puzzle game and ensure a rollback Pin
Member 1276922230-Sep-17 5:22
Member 1276922230-Sep-17 5:22 
GeneralRe: Use design patterns in the 15 puzzle game and ensure a rollback Pin
OriginalGriff30-Sep-17 5:40
mveOriginalGriff30-Sep-17 5:40 
GeneralRe: Use design patterns in the 15 puzzle game and ensure a rollback Pin
Nathan Minier2-Oct-17 1:35
professionalNathan Minier2-Oct-17 1:35 
Answeruse of design patterns in 15 puzzle Pin
Member 1276922230-Sep-17 0:23
Member 1276922230-Sep-17 0:23 
GeneralRe: use of design patterns in 15 puzzle Pin
OriginalGriff30-Sep-17 0:43
mveOriginalGriff30-Sep-17 0:43 
QuestionCreating Custom Message using data from Excel Pin
MRMOSES28-Sep-17 19:57
MRMOSES28-Sep-17 19:57 
AnswerRe: Creating Custom Message using data from Excel Pin
OriginalGriff28-Sep-17 20:10
mveOriginalGriff28-Sep-17 20:10 
GeneralRe: Creating Custom Message using data from Excel Pin
MRMOSES28-Sep-17 20:23
MRMOSES28-Sep-17 20:23 
AnswerRe: Creating Custom Message using data from Excel Pin
OriginalGriff28-Sep-17 20:26
mveOriginalGriff28-Sep-17 20:26 
GeneralRe: Creating Custom Message using data from Excel Pin
MRMOSES28-Sep-17 21:41
MRMOSES28-Sep-17 21:41 
GeneralRe: Creating Custom Message using data from Excel Pin
OriginalGriff28-Sep-17 22:10
mveOriginalGriff28-Sep-17 22:10 
QuestionSending a Url and querystring XML and getting a response, USPS Rate Request. Pin
jkirkerx28-Sep-17 7:28
professionaljkirkerx28-Sep-17 7: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.