By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

For structures: VB.Len or Marshal.SizeOf

P: n/a
I have some code converted from VB6 that contains VB.Len for structures.

VB.Len(lDevMode)

Seems to me that I can always change that to Marshal.SizeOf

Since sometimes Marshal.SizeOf works better

and VB.Len is never better.

Is that correct or are there cases when VB.Len is the correct one to use?

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
" Just Me" <gr****@a-znet.com> schrieb:
Since sometimes Marshal.SizeOf works better

and VB.Len is never better.

Is that correct or are there cases when VB.Len is the correct one to use?


In interop scenarios I would use 'Marshal.SizeOf' instead of 'Len'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

P: n/a
Thanks again

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
" Just Me" <gr****@a-znet.com> schrieb:
Since sometimes Marshal.SizeOf works better

and VB.Len is never better.

Is that correct or are there cases when VB.Len is the correct one to use?


In interop scenarios I would use 'Marshal.SizeOf' instead of 'Len'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.