How to get the no of memory bytes allocated to the Array of type String?

  • Thread starter Thread starter Sakharam Phapale
  • Start date Start date
S

Sakharam Phapale

Hi All,

How to get the no of memory bytes allocated to the Array of type String?

Dim arrDetail(100,10) As String

Thanks and Regards
Sakharam Phapale
 
How to get the no of memory bytes allocated to the Array of type String?

The array data itself takes (IntPtr.Size * 101 * 11) bytes. The array
class probably contains a header taking up some additional bytes.



Mattias
 
How can I differentiate following two statements in terms of no of bytes
allocated in memeory?

Dim arrDetail(100,10) As String

Dim arrDetail(100,10) As Integer

Enjoy Coding,
Sakharam Phapale
 
How can I differentiate following two statements in terms of no of bytes
allocated in memeory?

Dim arrDetail(100,10) As String

Dim arrDetail(100,10) As Integer

On a 32-bit platform where the size of an object reference is the same
as the size of an Integer, they take the same amount of memory. On a
64-bit platform the string array would consume twice as much memory.



Mattias
 
Back
Top