K
Ken Allen
I am relatively new to .Net, but have been using VB and C/C++ for years.
One of the drawbacks with VB6 and earlier was the difficulty in casting a
'record' to a different 'shape' so one could perform different manipulations
on it. For example, I have a complex data structure, which I can represent
in a VB6 TYPE declaration, but I cannot easily convert that to a fixed
length array of unsigned bytes so that I could perform a checksum
calculation on the contents. Another case is where a read a buffer from a
file and then wish to interpret the contents based on some header
information. This was also very difficult in VB6.
What facilities are available in VB.Met and C# (which does not have
pointers, which made this so easy, albeit error prone, in C and C++)?
-Ken
One of the drawbacks with VB6 and earlier was the difficulty in casting a
'record' to a different 'shape' so one could perform different manipulations
on it. For example, I have a complex data structure, which I can represent
in a VB6 TYPE declaration, but I cannot easily convert that to a fixed
length array of unsigned bytes so that I could perform a checksum
calculation on the contents. Another case is where a read a buffer from a
file and then wish to interpret the contents based on some header
information. This was also very difficult in VB6.
What facilities are available in VB.Met and C# (which does not have
pointers, which made this so easy, albeit error prone, in C and C++)?
-Ken