User Profile
Collapse
-
Ah i see that sounds good. Thanks everyone for their help!... -
Ah okay that's what I thought, just wanted to double check.
How do you delete the old object? I know in C++ there's a delete command you can type that does that, but doesn't seem to be the case for C#. Or is it just setting it to null?...Leave a comment:
-
So with the implementation that I have,
ie" array = new string[temp.length+1] does that actually make a new string array in dynamic memory?
Err sorry I forgot a for loop in there that copies the 3 elements from temp into array.
Oh man I totally forgot that C# has a built in Linked List library, lol I was thinking of using one but didn't wanna create it by scratch. Thanks for the input everyone!...Leave a comment:
-
Question about deleting objects in C#
Hello everyone, I just had a question about deleting objects in C#.
For example if I have a string array and I wanted to make it grow by one size adding the string "dd" to it.
string[] array = new string[] {"aa", "bb", "cc"};
string[] temp = array;
array = new string[temp.length+1];
array[3] = "dd";
So before the line "array...
No activity results to display
Show More
Leave a comment: