Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
AnswerRe: Which is more usefull Abstract Class or Interface and Why? Pin
Keith Barrow14-Apr-11 4:29
professionalKeith Barrow14-Apr-11 4:29 
GeneralRe: Which is more usefull Abstract Class or Interface and Why? Pin
Pete O'Hanlon14-Apr-11 5:28
mvePete O'Hanlon14-Apr-11 5:28 
QuestionLinkedList<T> since .NET 2 [modified] Pin
devvvy13-Apr-11 15:55
devvvy13-Apr-11 15:55 
AnswerRe: LinkedList since .NET 2 Pin
OriginalGriff14-Apr-11 0:10
mveOriginalGriff14-Apr-11 0:10 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 22:59
devvvy14-Apr-11 22:59 
GeneralRe: LinkedList since .NET 2 Pin
OriginalGriff14-Apr-11 23:07
mveOriginalGriff14-Apr-11 23:07 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:13
devvvy14-Apr-11 23:13 
GeneralRe: LinkedList since .NET 2 Pin
OriginalGriff14-Apr-11 23:28
mveOriginalGriff14-Apr-11 23:28 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:38
devvvy14-Apr-11 23:38 
GeneralRe: LinkedList since .NET 2 Pin
David198714-Apr-11 0:35
David198714-Apr-11 0:35 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:00
devvvy14-Apr-11 23:00 
GeneralRe: LinkedList since .NET 2 Pin
David198714-Apr-11 23:10
David198714-Apr-11 23:10 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:12
devvvy14-Apr-11 23:12 
GeneralRe: LinkedList since .NET 2 Pin
David198714-Apr-11 23:44
David198714-Apr-11 23:44 
No, just add the bytes. I'm comparing to a normal List<T> btw.
On 32bit, every linked list node is 12 bytes overhead + 3*4 for next/prev/parent-list (for the .NET implementation - you could skip that parent list node) + sizeof(T) and then aligned to a multiple of 4. That's at least 28 bytes for every item in the list - no matter how long that list is.
For a List<T>, there is 12 bytes overhead + 4*4 for size/version/items/syncRoot + capacity * sizeof(T). The overheads are only incurred once and the capacity is at most twice the number of items, as the list grows to infinity the size per element approaches 2 * sizeof(T) which is 16 bytes per element for doubles and longs but usually 8 bytes or less.
GeneralRe: LinkedList since .NET 2 Pin
devvvy16-Apr-11 16:53
devvvy16-Apr-11 16:53 
AnswerRe: LinkedList since .NET 2 Pin
PIEBALDconsult14-Apr-11 2:59
mvePIEBALDconsult14-Apr-11 2:59 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:11
devvvy14-Apr-11 23:11 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:43
devvvy14-Apr-11 23:43 
AnswerRe: LinkedList since .NET 2 Pin
Alan Balkany14-Apr-11 4:13
Alan Balkany14-Apr-11 4:13 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:03
devvvy14-Apr-11 23:03 
GeneralRe: LinkedList since .NET 2 Pin
Pete O'Hanlon14-Apr-11 23:37
mvePete O'Hanlon14-Apr-11 23:37 
GeneralRe: LinkedList since .NET 2 Pin
devvvy14-Apr-11 23:42
devvvy14-Apr-11 23:42 
GeneralRe: LinkedList since .NET 2 Pin
Alan Balkany15-Apr-11 3:24
Alan Balkany15-Apr-11 3:24 
GeneralRe: LinkedList since .NET 2 Pin
devvvy16-Apr-11 16:50
devvvy16-Apr-11 16:50 
GeneralRe: LinkedList since .NET 2 Pin
Alan Balkany18-Apr-11 4:07
Alan Balkany18-Apr-11 4:07 

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.