do variables takes memory?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshrasm
    Contributor
    • Nov 2007
    • 254

    do variables takes memory?

    Hi

    I have a confusion. I have declared more than 20 variables of string type in vb.net. but i have not assigned any value to it

    so I wanted to know that it will take memory or when i will assign then it will take memory
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by mukeshrasm
    Hi

    I have a confusion. I have declared more than 20 variables of string type in vb.net. but i have not assigned any value to it

    so I wanted to know that it will take memory or when i will assign then it will take memory
    The variables would each be initialized to null.
    Therefore your problem becomes that of finding out the size of null ...

    Comment

    • mukeshrasm
      Contributor
      • Nov 2007
      • 254

      #3
      Originally posted by r035198x
      The variables would each be initialized to null.
      Therefore your problem becomes that of finding out the size of null ...
      Hi

      When I declare variable like Dim ab as String or Dim a as Integer then do these variables occupy some space in the memory to store the which will be assigned later.

      Comment

      Working...