Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: JenB

So...what's the difference between an index and a key?

Just kidding. 'Sides, I'm assuming it's what you'd think: the index is kind of a list of contents and the key is...well...a list of what = what, kinda.

At least today I can officially say I've lost four pounds since the beginning of the year. Less than a pound a week, so I'm not speedy, but it's something. If I don't welch out, by late spring I might actually finally get to the goal I tried for three years ago.


5,034 posted on 02/01/2007 7:37:28 PM PST by RosieCotton
[ Post Reply | Private Reply | To 5029 | View Replies ]


To: RosieCotton

Index is the order an item appears in the list: the first item, second item, third item, etcetera. Key is some value the user sets which is unique across the list and identifies the item in some way. Like a user ID or bar code. The confusion is that in C#, sorted lists have keys. But you can't directly say "SortedList.GetByKey". You have to say SortedList.GetByIndex(IndexOfKey). Which is confusing I admit but....


5,051 posted on 02/02/2007 5:37:45 AM PST by JenB
[ Post Reply | Private Reply | To 5034 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson