Click here to Skip to main content
15,899,474 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Kevin McFarlane8-Nov-08 0:50
Kevin McFarlane8-Nov-08 0:50 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
supercat98-Nov-08 9:37
supercat98-Nov-08 9:37 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Kevin McFarlane8-Nov-08 9:43
Kevin McFarlane8-Nov-08 9:43 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Luc Pattyn8-Nov-08 2:49
sitebuilderLuc Pattyn8-Nov-08 2:49 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Mark Salsbery8-Nov-08 6:15
Mark Salsbery8-Nov-08 6:15 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
supercat98-Nov-08 9:25
supercat98-Nov-08 9:25 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Luc Pattyn8-Nov-08 12:36
sitebuilderLuc Pattyn8-Nov-08 12:36 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
supercat98-Nov-08 14:08
supercat98-Nov-08 14:08 
Luc Pattyn wrote:

yep, your SpecialDictionary.GetEnumerator() would behave quite different from
List.GetEnumerator() and others.


What sort of code would rely upon having a collection throw an exception on the next iteration of an enumerator following a change? To my mind, it would be reasonable to require an exception if the enumerator is incapable of functioning without malfunction, but if the enumerator can function without malfunction, why shouldn't it?

Actually, I find the design of the collection classes to be a pretty incredible mish-mosh. The Collection type doesn't mind deletion during enumeration; in a lot of ways it's a nice class, but it doesn't provide generic support, it isn't compatible with anything else, and seems to be deprecated despite its reasonable performance and unique abilities. As for other classes, HashTable offers better performance than Dictionary, but it's not compatible. It's useful that an iDictionary can return the Keys and Values properties, but they require absurdly broad interfaces. Having an iDictionary.Values support iEnumerable (which returns values rather than key-value pairs) is useful. But having it support an Add method? What is a Dictionary supposed to do if one attempts someDictionary.Values.Add(whatever)? The semantics seem totally nonsensical to me.

Incidentally, I also find it unfortunate that Microsoft didn't provide a WeakDelegate type. Adding some events to collections would make them more powerful, but unfortunately it would also create substantial risks of memory leakage.
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Luc Pattyn8-Nov-08 15:38
sitebuilderLuc Pattyn8-Nov-08 15:38 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
supercat99-Nov-08 6:17
supercat99-Nov-08 6:17 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Luc Pattyn9-Nov-08 7:57
sitebuilderLuc Pattyn9-Nov-08 7:57 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's [modified] Pin
supercat99-Nov-08 15:29
supercat99-Nov-08 15:29 
AnswerRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
Mark Churchill9-Nov-08 12:44
Mark Churchill9-Nov-08 12:44 
GeneralRe: Any fast way to do Array.IndexOf(Of Integer)() without DLL's Pin
supercat99-Nov-08 15:50
supercat99-Nov-08 15:50 
QuestionI am a novice at this, where can I post a job for .net developer? Pin
PhyllisM7-Nov-08 9:54
PhyllisM7-Nov-08 9:54 
AnswerRe: I am a novice at this, where can I post a job for .net developer? Pin
Colin Angus Mackay7-Nov-08 10:37
Colin Angus Mackay7-Nov-08 10:37 
GeneralRe: I am a novice at this, where can I post a job for .net developer? Pin
Mark Salsbery8-Nov-08 6:20
Mark Salsbery8-Nov-08 6:20 
GeneralRe: I am a novice at this, where can I post a job for .net developer? Pin
Colin Angus Mackay8-Nov-08 6:43
Colin Angus Mackay8-Nov-08 6:43 
GeneralRe: I am a novice at this, where can I post a job for .net developer? Pin
#realJSOP9-Nov-08 23:55
professional#realJSOP9-Nov-08 23:55 
GeneralRe: I am a novice at this, where can I post a job for .net developer? Pin
Paul Conrad8-Nov-08 13:20
professionalPaul Conrad8-Nov-08 13:20 
AnswerRe: I am a novice at this, where can I post a job for .net developer? Pin
Paul Conrad8-Nov-08 13:18
professionalPaul Conrad8-Nov-08 13:18 
AnswerRe: I am a novice at this, where can I post a job for .net developer? Pin
#realJSOP10-Nov-08 0:02
professional#realJSOP10-Nov-08 0:02 
Questiondatabase library Pin
joindotnet7-Nov-08 1:16
joindotnet7-Nov-08 1:16 
AnswerRe: database library Pin
Giorgi Dalakishvili7-Nov-08 2:17
mentorGiorgi Dalakishvili7-Nov-08 2:17 
GeneralRe: database library Pin
joindotnet7-Nov-08 2:58
joindotnet7-Nov-08 2:58 

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.