.NETGURU
SizeOf in VB
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngvb' list.


Bryan Costanich
-- Moved from [aspngdatagridrepeaterdatalist] to [aspngvb] by Let the good times roll <Click here to reveal e-mail address> --

-- Moved from [aspngvb] to [aspngdatagridrepeaterdatalist] by Let the good times roll <Click here to reveal e-mail address> --

I need to get the size in memory (in bytes) of a DataSet.

i've tried:

    Microsoft.VisualBasic.Len(Me.m_oSearchResults)

and got a type mismatch.

i tried:

    Microsoft.VisualBasic.Len(CType(Me.m_oSearchResults, Object))

and got the same error.

i tried:

    System.Runtime.InteropServices.Marshal.SizeOf(Me.m_oSearchResults)

and it errored because it's a managed type.

any ideas???

Reply to this message...
 
    
Darren Neimke
Q291bGQgeW91IHVzZSBhbiB1bnNhZmUgQyMgY2FsbCB0byBnZXQgdGhlIHNpemUgdXNpbmcgc2l6
ZW9mKCkgPz8gIFBlcmhhcHMgcmVhZCB0aGUgZG9jY28gb24gdGhhdC4NCg0KCS0tLS0tT3JpZ2lu
YWwgTWVzc2FnZS0tLS0tIA0KCUZyb206IEJyeWFuIENvc3RhbmljaCBbbWFpbHRvOkJyeWFuQ0Bz
YWx0bWluZS5jb21dIA0KCVNlbnQ6IFRodSAxNS8wOC8yMDAyIDc6NTQgQU0gDQoJVG86IGFzcG5n
dmIgDQoJQ2M6IA0KCVN1YmplY3Q6IFthc3BuZ3ZiXSBTaXplT2YgaW4gVkINCgkNCgkNCg0KCS0t
IE1vdmVkIGZyb20gW2FzcG5nZGF0YWdyaWRyZXBlYXRlcmRhdGFsaXN0XSB0byBbYXNwbmd2Yl0g
YnkgTGV0IHRoZSBnb29kIHRpbWVzIHJvbGwgPGJiaWxicm9AaG90bWFpbC5jb20+IC0tDQoJDQoJ
LS0gTW92ZWQgZnJvbSBbYXNwbmd2Yl0gdG8gW2FzcG5nZGF0YWdyaWRyZXBlYXRlcmRhdGFsaXN0
XSBieSBMZXQgdGhlIGdvb2QgdGltZXMgcm9sbCA8YmJpbGJyb0Bob3RtYWlsLmNvbT4gLS0NCgkN
CglJIG5lZWQgdG8gZ2V0IHRoZSBzaXplIGluIG1lbW9yeSAoaW4gYnl0ZXMpIG9mIGEgRGF0YVNl
dC4NCgkNCglpJ3ZlIHRyaWVkOg0KCQ0KCSAgICAgICAgTWljcm9zb2Z0LlZpc3VhbEJhc2ljLkxl
bihNZS5tX29TZWFyY2hSZXN1bHRzKQ0KCQ0KCWFuZCBnb3QgYSB0eXBlIG1pc21hdGNoLg0KCQ0K
CWkgdHJpZWQ6DQoJDQoJICAgICAgICBNaWNyb3NvZnQuVmlzdWFsQmFzaWMuTGVuKENUeXBlKE1l
Lm1fb1NlYXJjaFJlc3VsdHMsIE9iamVjdCkpDQoJDQoJYW5kIGdvdCB0aGUgc2FtZSBlcnJvci4N
CgkNCglpIHRyaWVkOg0KCQ0KCSAgICAgICAgU3lzdGVtLlJ1bnRpbWUuSW50ZXJvcFNlcnZpY2Vz
Lk1hcnNoYWwuU2l6ZU9mKE1lLm1fb1NlYXJjaFJlc3VsdHMpDQoJDQoJYW5kIGl0IGVycm9yZWQg
YmVjYXVzZSBpdCdzIGEgbWFuYWdlZCB0eXBlLg0KCQ0KCWFueSBpZGVhcz8/Pw0KCXwgW2FzcG5n
dmJdIG1lbWJlciBkYXJyZW4ubmVpbWtlQHNkbS5jb20uYXUgPSBZT1VSIElEDQoJfCBodHRwOi8v
d3d3LmFzcGxpc3RzLmNvbS9hc3BsaXN0cy9hc3BuZ3ZiLmFzcCA9IEpPSU4vUVVJVA0KCQ0KDQo
Reply to this message...
 
    
Patrick Steele
I don't think you can get a true "sizeof" of a reference type. See:

http://groups.google.com/groups?selm=3DeoDeVh1XAHA.279%40cppssbbsa04&oe=3D=
UT
F-8

---
Patrick Steele (Click here to reveal e-mail address)
Lead Software Architect
Image Process Design

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]=20
Sent: Wednesday, August 14, 2002 6:24 PM
To: aspngvb
Subject: [aspngvb] SizeOf in VB

-- Moved from [aspngdatagridrepeaterdatalist] to [aspngvb] by Let the
good times roll <Click here to reveal e-mail address> --

-- Moved from [aspngvb] to [aspngdatagridrepeaterdatalist] by Let the
good times roll <Click here to reveal e-mail address> --

I need to get the size in memory (in bytes) of a DataSet.

i've tried:

    Microsoft.VisualBasic.Len(Me.m_oSearchResults)

and got a type mismatch.

i tried:

    Microsoft.VisualBasic.Len(CType(Me.m_oSearchResults, Object))

and got the same error.

i tried:

=09
System.Runtime.InteropServices.Marshal.SizeOf(Me.m_oSearchResults)

and it errored because it's a managed type.

any ideas???
| [aspngvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngvb.asp =3D JOIN/QUIT

Reply to this message...
 
 
System.Data.DataSet
System.Runtime.InteropServices.Marshal




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification