Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
how can we increase the length of array on runtime?
Faisal Ansari
13y
1.5k
1
Reply
hello guys
how r u all ?
Q: How can we increase the length of array on runtime in c sharp?
i am trying this code:
public class TestArray
{
static int size = 0;
static int[] array = new int[size];
public TestArray()
{
size++;
Console.WriteLine(array[size]);
}
}
public class Program
{
public static void Main(string[] args)
{
TestArray t = new TestArray();
}
}
Reply soon
Thanks.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Attach dll
install dll