Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
AnswerRe: No overload for method 'Open' takes '13' arguments.... Pin
Christian Graus17-Aug-07 20:57
protectorChristian Graus17-Aug-07 20:57 
AnswerRe: No overload for method 'Open' takes '13' arguments.... Pin
Luc Pattyn18-Aug-07 0:26
sitebuilderLuc Pattyn18-Aug-07 0:26 
QuestionImporting xsd Pin
dnlstffrd17-Aug-07 19:57
dnlstffrd17-Aug-07 19:57 
QuestionRe:Displaying child windows Pin
RameshwerE17-Aug-07 19:34
RameshwerE17-Aug-07 19:34 
AnswerRe:Displaying child windows Pin
Rocky#17-Aug-07 19:50
Rocky#17-Aug-07 19:50 
AnswerRe:Displaying child windows Pin
Christian Graus17-Aug-07 20:14
protectorChristian Graus17-Aug-07 20:14 
AnswerRe:Displaying child windows Pin
Doug.Chen17-Aug-07 21:54
Doug.Chen17-Aug-07 21:54 
QuestionRe:Displaying child windows Pin
Doug.Chen17-Aug-07 21:59
Doug.Chen17-Aug-07 21:59 
AnswerRe:Displaying child windows Pin
Hessam Jalali17-Aug-07 22:10
Hessam Jalali17-Aug-07 22:10 
Questionbinpath Pin
sima_m17-Aug-07 19:28
sima_m17-Aug-07 19:28 
AnswerRe: binpath Pin
Paul Conrad18-Aug-07 3:25
professionalPaul Conrad18-Aug-07 3:25 
QuestionDate Conversion Pin
Parvai17-Aug-07 19:27
Parvai17-Aug-07 19:27 
AnswerRe: Date Conversion Pin
Christian Graus17-Aug-07 20:19
protectorChristian Graus17-Aug-07 20:19 
AnswerRe: Date Conversion Pin
Luc Pattyn18-Aug-07 0:32
sitebuilderLuc Pattyn18-Aug-07 0:32 
AnswerRe: Date Conversion Pin
PIEBALDconsult18-Aug-07 10:05
mvePIEBALDconsult18-Aug-07 10:05 
Questionhow to send a complex message in msmq [modified] Pin
zencer17-Aug-07 18:43
zencer17-Aug-07 18:43 
Questioncomparing two versions of the same document side-by-side graphically Pin
vkponugoti17-Aug-07 16:28
vkponugoti17-Aug-07 16:28 
Questiongraphics in C# Pin
shaikhooo17-Aug-07 14:23
shaikhooo17-Aug-07 14:23 
AnswerRe: graphics in C# Pin
Luc Pattyn17-Aug-07 14:33
sitebuilderLuc Pattyn17-Aug-07 14:33 
QuestionRole based security Pin
MBursill17-Aug-07 13:39
MBursill17-Aug-07 13:39 
QuestionHandling large blocks of memory in C# Pin
sbpont17-Aug-07 11:40
sbpont17-Aug-07 11:40 
AnswerRe: Handling large blocks of memory in C# Pin
Luc Pattyn17-Aug-07 11:46
sitebuilderLuc Pattyn17-Aug-07 11:46 
Hi,

I think you are completely wrong about this; if you create an object, you
allocate some memory and get a reference, that's what the "new" keyword does for you.
Think of the reference as a pointer, if that suits you.

You now can copy that reference, you now have to variables referencing the same
object; no data got copied, it is just the pointer value that got copied.

You can store a reference in a collection (an array, a List, a Queue, whatever),
that does not move any data, it simply copies the pointer.

Things would be different if you were to serialize your object, e.g. because
you want to pass it to another AppDomain, or to another machine entirely.
But as long as your object stays inside an AppDomain, no data gets copied.

As a final test, you can do the following:

byte[] bigArray=new byte[100*1024*1024];  // that's 100 MB
ArrayList list=new ArrayList();
for (int i=0; i<1000; i++) list.Add(bigArray);


The above creates a 100MB array, then stores it 1000 times in a list.
Did that require 100GB of RAM?
Run it with a stopwatch; could you get that amount of data copied in that short
a time?
Don't think so.

Smile | :)



Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


AnswerRe: Handling large blocks of memory in C# Pin
Guffa17-Aug-07 12:37
Guffa17-Aug-07 12:37 
QuestionPrint contents of a textbox Pin
LCI17-Aug-07 10:25
LCI17-Aug-07 10:25 
QuestionSystem Language Pin
Thaer Hamael17-Aug-07 10:00
Thaer Hamael17-Aug-07 10:00 

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.