Click here to Skip to main content
15,891,746 members
Home / Discussions / C#
   

C#

 
AnswerRe: showing newly added row in datagridview - Winforms Pin
Luc Pattyn25-Apr-11 11:11
sitebuilderLuc Pattyn25-Apr-11 11:11 
Question.NET Collections - Capacity [modified] Pin
devvvy25-Apr-11 1:03
devvvy25-Apr-11 1:03 
AnswerRe: .NET Collections - Capacity Pin
Luc Pattyn25-Apr-11 1:17
sitebuilderLuc Pattyn25-Apr-11 1:17 
GeneralRe: .NET Collections - Capacity Pin
devvvy25-Apr-11 1:27
devvvy25-Apr-11 1:27 
GeneralRe: .NET Collections - Capacity Pin
Luc Pattyn25-Apr-11 1:33
sitebuilderLuc Pattyn25-Apr-11 1:33 
GeneralRe: .NET Collections - Capacity Pin
devvvy25-Apr-11 1:37
devvvy25-Apr-11 1:37 
GeneralRe: .NET Collections - Capacity [modified] Pin
devvvy25-Apr-11 1:52
devvvy25-Apr-11 1:52 
GeneralRe: .NET Collections - Capacity Pin
AspDotNetDev25-Apr-11 11:05
protectorAspDotNetDev25-Apr-11 11:05 
devvvy wrote:
I suspect therefore when inserting to last slot, reallocation would occur - not sure grow by how much however.


I think dictionaries are typically implemented to grow once a certain percent of capacity has been reached, though "capacity" would be somewhat of a misnomer. So maybe once the array is at least 70% full, then it resizes (read about load factor). Also, dictionaries don't need to resize, as they typically contain collision lists... the resizing is done for performance. As far as how much they would grow, that would probably be some constant multiplier (e.g., by 2x each growth). Some implementations allow you to specify these values (growth factor and resize threshold).

If you want to see how .Net implements the Dictionary class, I recommend using Reflector or ILSpy. You might also consider monitoring your memory usage with very large dictionaries. The MSDN documentation might also contain some info about the constants used.
Chris Maunder wrote:
Fixign now.
But who's fixing the fixign?

GeneralRe: .NET Collections - Capacity Pin
Jason Christian26-Apr-11 8:13
Jason Christian26-Apr-11 8:13 
AnswerRe: .NET Collections - Capacity Pin
AspDotNetDev25-Apr-11 11:10
protectorAspDotNetDev25-Apr-11 11:10 
GeneralRe: .NET Collections - Capacity Pin
Charvak Karpe28-Apr-11 3:47
Charvak Karpe28-Apr-11 3:47 
QuestionHow Can i Create A Class Library For MSACCESS database Connection Pin
Arunkumar.Koloth24-Apr-11 19:03
Arunkumar.Koloth24-Apr-11 19:03 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
Tarakeshwar Reddy24-Apr-11 19:13
professionalTarakeshwar Reddy24-Apr-11 19:13 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
Richard MacCutchan24-Apr-11 22:02
mveRichard MacCutchan24-Apr-11 22:02 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
PIEBALDconsult25-Apr-11 3:01
mvePIEBALDconsult25-Apr-11 3:01 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
ambarishtv28-Apr-11 6:27
ambarishtv28-Apr-11 6:27 
QuestionListBox.PreferredSize.Width interesting event Pin
msn9224-Apr-11 4:33
msn9224-Apr-11 4:33 
AnswerRe: ListBox.PreferredSize.Width interesting event Pin
DaveyM6924-Apr-11 12:30
professionalDaveyM6924-Apr-11 12:30 
QuestionArray Pin
messages23-Apr-11 1:40
messages23-Apr-11 1:40 
AnswerRe: Array PinPopular
David198723-Apr-11 2:15
David198723-Apr-11 2:15 
GeneralRe: Array Pin
messages23-Apr-11 2:20
messages23-Apr-11 2:20 
GeneralRe: Array Pin
David198723-Apr-11 3:08
David198723-Apr-11 3:08 
AnswerRe: Array Pin
OriginalGriff23-Apr-11 8:23
mveOriginalGriff23-Apr-11 8:23 
GeneralRe: Array Pin
Prasanta_Prince23-Apr-11 18:52
Prasanta_Prince23-Apr-11 18:52 
GeneralRe: Array Pin
messages23-Apr-11 19:56
messages23-Apr-11 19:56 

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.