Results 1 to 3 of 3

Thread: Is this good programming practice?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    41

    Smile Is this good programming practice?

    The following example code will compile, but I'm wondering if it's considered a good way of doing things generally?

    Code:
    for(int i = 0; i < selectedElementsFromMyArray; i++)
    {
         
    myTemporaryStorage.Add(myArray[selectedElementsFromMyArray[i]]);
    
    }
    I want to add a subset of elements from myArray into myTemporaryStorage, the indexes of the elements to be stored are held in selectedElementsFromMyArray.

    Good progarmming or bad, please let me know. Thanks.
    Last edited by The Thing; Dec 19th, 2006 at 06:44 PM.
    Using: VB.net + C#.net 2005 Express Editions + .Net Framework 2.0

    ~ Man Is The Warmest Place To Hide ~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width