How do you preserve the contents of an array from being cleared when the array is redimensioned?

A) Using Redim Keyword
B) Using Preserve Keyword
C) Using Reserve Keyword

Showing Answers 1 - 8 of 8 Answers

sumit01_77

  • Dec 15th, 2005
 

Explanation:

According to MSDN:

Preserve Keyword is an Optional, Keyword used to preserve the data in the existing array when you change the size of only the last dimension.

However, ReDim Statement is Used at procedure level to reallocate storage space for an array variable.

ReDim [ Preserve ] name(boundlist)

  Was this answer useful?  Yes

Ash Khan

  • May 13th, 2006
 

B) Using Preserve Keyword

  Was this answer useful?  Yes

debasish

  • Jul 22nd, 2015
 

A) Using Redim Keyword

  Was this answer useful?  Yes

Ankit Kumar

  • Oct 11th, 2015
 

B) Using Preserve Keyword

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions