How can you change the size of an array in C#?

What will be an ideal response?


You can change the size of an array associated with an identifier, if necessary. For example, if you declare int[] array;, you can assign five elements later with array = new int[5];; later in the program, you might alter the array size to 100 with array = new int[100];. Still later, you could alter it again to be either larger or smaller. This feature is not allowed in most other programming languages. If you resize an array in this manner, the same identifier refers to a new array in memory and all the values are set to 0.

Computer Science & Information Technology

You might also like to view...

A device used to convert high and low voltages into two different tones suitable for transmission over telephone lines is called a(n) ________

A) ISP B) frequency checker C) Internet D) modem

Computer Science & Information Technology

Of the four Microsoft Office 2013 programs, the ________ Home tab is the most unique and different than the other programs

A) Excel B) PowerPoint C) Access D) Word

Computer Science & Information Technology

A sectoris a narrow recording band that forms a full circle on the surface of the disk.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What restriction does the array-based implementation of a stack place on the push operation?

What will be an ideal response?

Computer Science & Information Technology