Click here to Skip to main content
15,914,924 members
Home / Discussions / C#
   

C#

 
QuestionGroups in Active Directory Pin
zaboboa1-Dec-05 4:06
zaboboa1-Dec-05 4:06 
AnswerRe: Groups in Active Directory Pin
Jared Parsons1-Dec-05 7:53
Jared Parsons1-Dec-05 7:53 
QuestionMultithreading Question Pin
akyriako781-Dec-05 2:09
akyriako781-Dec-05 2:09 
AnswerRe: Multithreading Question Pin
S. Senthil Kumar1-Dec-05 3:37
S. Senthil Kumar1-Dec-05 3:37 
GeneralRe: Multithreading Question Pin
akyriako781-Dec-05 6:13
akyriako781-Dec-05 6:13 
GeneralRe: Multithreading Question Pin
Jared Parsons1-Dec-05 7:55
Jared Parsons1-Dec-05 7:55 
QuestionHow to access a configuration file in a COM add-in Pin
cathignol1-Dec-05 1:36
cathignol1-Dec-05 1:36 
QuestionHow to copy file from a server to the other when other server is in different domain!!!! Pin
sammi19761-Dec-05 1:33
sammi19761-Dec-05 1:33 
AnswerRe: How to copy file from a server to the other when other server is in different domain!!!! Pin
Colin Angus Mackay1-Dec-05 4:19
Colin Angus Mackay1-Dec-05 4:19 
Questiondouble buffering Pin
bwagz1-Dec-05 1:32
bwagz1-Dec-05 1:32 
AnswerRe: double buffering Pin
mcljava2-Dec-05 8:26
mcljava2-Dec-05 8:26 
Questionwindow handle in .net Pin
ramenk1-Dec-05 1:18
ramenk1-Dec-05 1:18 
AnswerRe: window handle in .net Pin
S. Senthil Kumar1-Dec-05 3:13
S. Senthil Kumar1-Dec-05 3:13 
AnswerRe: window handle in .net Pin
Dave Kreskowiak1-Dec-05 6:30
mveDave Kreskowiak1-Dec-05 6:30 
Question.NET Deployment(embed msi in msi) Pin
sameerbhise.pspl1-Dec-05 1:03
sameerbhise.pspl1-Dec-05 1:03 
AnswerRe: .NET Deployment(embed msi in msi) Pin
Curtis Schlak.1-Dec-05 15:43
Curtis Schlak.1-Dec-05 15:43 
QuestionGetting the size of an object Pin
MrEyes1-Dec-05 0:42
MrEyes1-Dec-05 0:42 
hello all,

Quite simply, I need to get the size of an objects memory footprint, does anybody know how this can be done in C#? e.g The amount of bytes of memory a DataSet object uses after it has been populated via a database call.

I have looked at the sizeof(..) MSDN docs, but these indicate that the function is only valid for Value types and is also unsafe code (something I would prefer to avoid). There is also the System.Runtime.InteropServices.Marshal.SizeOf(..) function which unfortunatly returns the following error for datasets:

Additional information: Type System.Data.DataSet can not be marshaled as an unmanaged structure; no meaningful size or offset can be computed.

At the moment I have a very clunky piece of code that parses the DataSet via an XML object into a Byte[] and then uses the length of the array. Not very pretty at all

Thanks







post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
AnswerRe: Getting the size of an object Pin
Dave Kreskowiak1-Dec-05 6:29
mveDave Kreskowiak1-Dec-05 6:29 
AnswerRe: Getting the size of an object Pin
Andy Brummer1-Dec-05 8:08
sitebuilderAndy Brummer1-Dec-05 8:08 
GeneralRe: Getting the size of an object Pin
MrEyes1-Dec-05 23:01
MrEyes1-Dec-05 23:01 
Questionchange background of console Pin
lucluv1-Dec-05 0:40
lucluv1-Dec-05 0:40 
AnswerRe: change background of console Pin
Rob Philpott1-Dec-05 1:09
Rob Philpott1-Dec-05 1:09 
AnswerRe: change background of console Pin
Rob Philpott1-Dec-05 1:14
Rob Philpott1-Dec-05 1:14 
Questionproblem with XMLConvert.ToDateTime Pin
Rafferty Uy30-Nov-05 21:45
Rafferty Uy30-Nov-05 21:45 
AnswerRe: problem with XMLConvert.ToDateTime Pin
Rob Philpott30-Nov-05 23:28
Rob Philpott30-Nov-05 23:28 

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.