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

C#

 
GeneralEncapsulating properties as nested class Pin
Enrico Angkawijaya6-Apr-04 11:16
Enrico Angkawijaya6-Apr-04 11:16 
GeneralAuthentication with back-end DB Pin
mil_an6-Apr-04 7:18
mil_an6-Apr-04 7:18 
GeneralRe: Authentication with back-end DB Pin
Heath Stewart6-Apr-04 10:39
protectorHeath Stewart6-Apr-04 10:39 
GeneralArray and related collections. Pin
HAHAHA_NEXT6-Apr-04 6:28
HAHAHA_NEXT6-Apr-04 6:28 
GeneralRe: Array and related collections. Pin
Judah Gabriel Himango6-Apr-04 6:37
sponsorJudah Gabriel Himango6-Apr-04 6:37 
GeneralRe: Array and related collections. Pin
Heath Stewart6-Apr-04 6:42
protectorHeath Stewart6-Apr-04 6:42 
GeneralRe: Array and related collections. Pin
HAHAHA_NEXT6-Apr-04 7:07
HAHAHA_NEXT6-Apr-04 7:07 
GeneralRe: Array and related collections. Pin
Heath Stewart6-Apr-04 10:36
protectorHeath Stewart6-Apr-04 10:36 
An ArrayList stores objects, so if you add reference types to the list, there's really no performance hit (1 to 2 extra instructions are required to cast, and optionally store, your type, but that's negligible). If you store value types, there is a slight performance hit because value types must be boxed and unboxed to store as an object. This is one of many reasons why generics will be great to have in the upcoming .NET Framework 2.0. Then you can declare a new list of value types, like List<int> ints = new List<int>();.

This (un)boxing is typically not too big a problem if you don't use it a lot and don't need to milk your app for performance for every last drop. If you do, then you might consider implementing your own ArrayList-like class, implementing all the same interfaces (for the best support) and keep an array of whatever value type you need. Grow it when needs be, just like the ArrayList would.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Array and related collections. Pin
HAHAHA_NEXT6-Apr-04 10:52
HAHAHA_NEXT6-Apr-04 10:52 
GeneralMy Fellow coders.. A question about Images Pin
OMalleyW6-Apr-04 5:07
OMalleyW6-Apr-04 5:07 
GeneralRe: My Fellow coders.. A question about Images Pin
Heath Stewart6-Apr-04 5:24
protectorHeath Stewart6-Apr-04 5:24 
GeneralRe: My Fellow coders.. A question about Images Pin
OMalleyW7-Apr-04 11:32
OMalleyW7-Apr-04 11:32 
GeneralRe: My Fellow coders.. A question about Images Pin
Heath Stewart7-Apr-04 12:07
protectorHeath Stewart7-Apr-04 12:07 
GeneralRotation Pin
oOomen6-Apr-04 4:32
oOomen6-Apr-04 4:32 
GeneralRe: Rotation Pin
Heath Stewart6-Apr-04 5:22
protectorHeath Stewart6-Apr-04 5:22 
GeneralRe: Rotation Pin
oOomen6-Apr-04 6:12
oOomen6-Apr-04 6:12 
GeneralRe: Rotation Pin
Heath Stewart6-Apr-04 6:16
protectorHeath Stewart6-Apr-04 6:16 
GeneralFastest way to upload large files Pin
bobbiek6-Apr-04 4:20
bobbiek6-Apr-04 4:20 
GeneralRe: Fastest way to upload large files Pin
Daniel Turini6-Apr-04 4:56
Daniel Turini6-Apr-04 4:56 
GeneralRe: Fastest way to upload large files Pin
bobbiek6-Apr-04 5:12
bobbiek6-Apr-04 5:12 
GeneralRe: Fastest way to upload large files Pin
Heath Stewart6-Apr-04 5:20
protectorHeath Stewart6-Apr-04 5:20 
GeneralRe: Fastest way to upload large files Pin
bobbiek6-Apr-04 5:39
bobbiek6-Apr-04 5:39 
GeneralRe: Fastest way to upload large files Pin
Heath Stewart6-Apr-04 5:49
protectorHeath Stewart6-Apr-04 5:49 
GeneralRe: Fastest way to upload large files Pin
bobbiek6-Apr-04 6:16
bobbiek6-Apr-04 6:16 
GeneralRe: Fastest way to upload large files Pin
Heath Stewart6-Apr-04 6:23
protectorHeath Stewart6-Apr-04 6:23 

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.