User Profile

Collapse

Profile Sidebar

Collapse
n00b
n00b
Last Activity: Jan 24 '08, 10:41 PM
Joined: Oct 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • n00b
    replied to Question about deleting objects in C#
    in .NET
    Ah i see that sounds good. Thanks everyone for their help!...
    See more | Go to post

    Leave a comment:


  • n00b
    replied to Question about deleting objects in C#
    in .NET
    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?...
    See more | Go to post

    Leave a comment:


  • n00b
    replied to Question about deleting objects in C#
    in .NET
    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!...
    See more | Go to post

    Leave a comment:


  • n00b
    started a topic Question about deleting objects in C#
    in .NET

    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...
    See more | Go to post
No activity results to display
Show More
Working...