Click here to Skip to main content
16,015,504 members
Home / Discussions / C#
   

C#

 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 9:10
professionalPaul Conrad27-Jan-08 9:10 
GeneralRe: Optimization Pin
half-life27-Jan-08 9:51
half-life27-Jan-08 9:51 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 9:56
professionalPaul Conrad27-Jan-08 9:56 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 6:35
sitebuilderLuc Pattyn27-Jan-08 6:35 
GeneralRe: Optimization Pin
half-life27-Jan-08 7:07
half-life27-Jan-08 7:07 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 7:34
sitebuilderLuc Pattyn27-Jan-08 7:34 
GeneralRe: Optimization Pin
half-life27-Jan-08 8:38
half-life27-Jan-08 8:38 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 8:53
sitebuilderLuc Pattyn27-Jan-08 8:53 
half-life wrote:
WOW, it's a big world out there


yes indeed, and the universe is still expanding.


half-life wrote:
does hashtable uses a lot of resourses?


The HashTable itself is fine, storing a zillion objects in it could take a lot of memory,
when you do not really need to remember those objects (if the objects are alive anyway, then
the cost is basically just a reference to the object; when the object is not referenced anywhere
else, keeping it in a HashTable keeps it alive, hence costs the entire memory footprint of
the object).

It is a common memory leak: create a class, add a static collection to it that remembers
all instances of that class, have some debug code listing all those instances, etc, but
ignoring that the collection keeps growing while it remembers all these instances, even
if they are no longer alive outside the class.


half-life wrote:
for every Question there is an Answer


not quite. In general, some questions have no answer, some have one, some have many.
On CodeProject forums, most questions have many replies, not all of them are actual answers.


half-life wrote:
creating hashtables insted of frequentlly using the foreac


These are different things. HashTables are handy to remember associations between a number
of keys and an equal number of values. foreach is a way to loop over all elements of a
collection.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: Optimization Pin
half-life27-Jan-08 9:53
half-life27-Jan-08 9:53 
GeneralRe: Optimization Pin
PIEBALDconsult27-Jan-08 7:39
mvePIEBALDconsult27-Jan-08 7:39 
GeneralRe: Optimization Pin
half-life27-Jan-08 8:41
half-life27-Jan-08 8:41 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 9:21
sitebuilderLuc Pattyn27-Jan-08 9:21 
GeneralRe: Optimization Pin
half-life27-Jan-08 9:54
half-life27-Jan-08 9:54 
GeneralRe: Optimization Pin
PIEBALDconsult27-Jan-08 10:47
mvePIEBALDconsult27-Jan-08 10:47 
QuestionShare source code of C# Pin
kelary27-Jan-08 2:51
kelary27-Jan-08 2:51 
GeneralRe: Share source code of C# Pin
Giorgi Dalakishvili27-Jan-08 3:00
mentorGiorgi Dalakishvili27-Jan-08 3:00 
GeneralRe: Share source code of C# Pin
Paul Conrad27-Jan-08 5:50
professionalPaul Conrad27-Jan-08 5:50 
QuestionHow to Represent String Constants Pin
Brady Kelly27-Jan-08 0:11
Brady Kelly27-Jan-08 0:11 
AnswerRe: How to Represent String Constants Pin
PIEBALDconsult27-Jan-08 4:15
mvePIEBALDconsult27-Jan-08 4:15 
GeneralRe: How to Represent String Constants Pin
Brady Kelly27-Jan-08 4:49
Brady Kelly27-Jan-08 4:49 
GeneralRe: How to Represent String Constants Pin
PIEBALDconsult27-Jan-08 7:49
mvePIEBALDconsult27-Jan-08 7:49 
GeneralRe: How to Represent String Constants Pin
Brady Kelly27-Jan-08 8:06
Brady Kelly27-Jan-08 8:06 
GeneralResolution and Icon Layout Pin
half-life26-Jan-08 23:34
half-life26-Jan-08 23:34 
Question[Message Deleted] Pin
methhoo26-Jan-08 23:32
methhoo26-Jan-08 23:32 
GeneralRe: manipulate a web page with a C# application ? Pin
Ravi Bhavnani27-Jan-08 8:07
professionalRavi Bhavnani27-Jan-08 8: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.