Click here to Skip to main content
15,910,123 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regex problem Pin
leppie23-Dec-04 7:41
leppie23-Dec-04 7:41 
GeneralRe: Regex problem Pin
Yaakov Davis23-Dec-04 7:56
Yaakov Davis23-Dec-04 7:56 
GeneralRe: Regex problem Pin
TyronX23-Dec-04 8:09
TyronX23-Dec-04 8:09 
GeneralRe: Regex problem Pin
leppie23-Dec-04 8:10
leppie23-Dec-04 8:10 
GeneralRe: Regex problem Pin
Yaakov Davis23-Dec-04 8:50
Yaakov Davis23-Dec-04 8:50 
GeneralQuestion about efficiency - Hashtable key types Pin
Tristan Rhodes23-Dec-04 6:28
Tristan Rhodes23-Dec-04 6:28 
GeneralRe: Question about efficiency - Hashtable key types Pin
leppie23-Dec-04 7:42
leppie23-Dec-04 7:42 
GeneralRe: Question about efficiency - Hashtable key types Pin
Tristan Rhodes23-Dec-04 9:57
Tristan Rhodes23-Dec-04 9:57 
Ok, that's cool. Now another question. Smile | :)

What would take up more space in memory overall? A class with 5-6 parameters, say a short string, few ints, and enumerations. Or a single string of say 40 charachters?

I'm assuming that i will have a few hundred objects with these values in them, so i'd like to make it efficient for space. If i remember correctly, a string is a value type, so it will take up space for each instance of itself. Now, if 100 objects have this string key, it will be 100x the string value. But if I use an object, they are handled as refference type, and only 1 exists, but many objects would have access to it.

Am I right? Would an object form be less expensive for memory?
On the other hand, some of these objects may only be used once, and therefore could benefit from the smaller space that the string would be.
Of course, I could always go with pointers to strings... but it could be a headache.

what do you think?

Cheers

Cata
GeneralRe: Question about efficiency - Hashtable key types Pin
Matt Gerrans23-Dec-04 11:47
Matt Gerrans23-Dec-04 11:47 
Questionhow to get mirror printing using c# Pin
bigmega23-Dec-04 5:32
bigmega23-Dec-04 5:32 
AnswerRe: how to get mirror printing using c# Pin
Heath Stewart23-Dec-04 8:16
protectorHeath Stewart23-Dec-04 8:16 
GeneralWindows Installer Problem Pin
Asad Hussain23-Dec-04 5:13
Asad Hussain23-Dec-04 5:13 
GeneralRe: Windows Installer Problem Pin
Heath Stewart23-Dec-04 5:19
protectorHeath Stewart23-Dec-04 5:19 
GeneralRe: Windows Installer Problem Pin
leppie23-Dec-04 7:49
leppie23-Dec-04 7:49 
GeneralRe: Windows Installer Problem Pin
Heath Stewart23-Dec-04 7:54
protectorHeath Stewart23-Dec-04 7:54 
Generalfatal error CS0013: Unexpected error writing metadata to file Pin
Divick23-Dec-04 4:34
Divick23-Dec-04 4:34 
GeneralRe: fatal error CS0013: Unexpected error writing metadata to file Pin
Heath Stewart23-Dec-04 6:07
protectorHeath Stewart23-Dec-04 6:07 
GeneralRe: fatal error CS0013: Unexpected error writing metadata to file Pin
Divick23-Dec-04 19:56
Divick23-Dec-04 19:56 
GeneralRe: fatal error CS0013: Unexpected error writing metadata to file Pin
Heath Stewart23-Dec-04 20:01
protectorHeath Stewart23-Dec-04 20:01 
GeneralRe: fatal error CS0013: Unexpected error writing metadata to file Pin
Divick24-Dec-04 0:52
Divick24-Dec-04 0:52 
GeneralRe: fatal error CS0013: Unexpected error writing metadata to file Pin
Heath Stewart27-Dec-04 10:02
protectorHeath Stewart27-Dec-04 10:02 
GeneralUsing separate class to handle events of user controls Pin
jomargon23-Dec-04 3:44
jomargon23-Dec-04 3:44 
GeneralRe: Using separate class to handle events of user controls Pin
Heath Stewart23-Dec-04 6:03
protectorHeath Stewart23-Dec-04 6:03 
GeneralRe: Using separate class to handle events of user controls Pin
jomargon24-Dec-04 15:06
jomargon24-Dec-04 15:06 
GeneralRe: Using separate class to handle events of user controls Pin
Heath Stewart27-Dec-04 10:21
protectorHeath Stewart27-Dec-04 10:21 

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.