Nothing is impossible

Big Cats

The term big cat, or great cat, while not a biological classification, is used informally to distinguish the larger felid species from smaller ones. A narrower definition of includes five members of the genus Panthera: the tiger, lion, jaguar, leopard, and snow leopard. Only members of this genus are able to roar.

2016

2010

Comments
  1. Gisle Aune
    Gisle Aune

    Isn't a for loop more effective when adressing each object in a collection? Like this?

    DirectoryInfo dir = null;
    for(int i = 0; int i < directories.length; i += 1)
    {
    dir = directories[i]
    result.AppendLine(indent + dir.Name);

    // Call the method again on the directories found
    result.Append(directoryListing(dir.FullName, indent + "..").ToString());

    }

    1. Tim Trott
      Tim Trott

      Yes, you are absolutely correct. Performance wise a for loop is much faster to execute and should be used for performance critical applications. It wasn't until I did some investigation that I found out just how much faster a for loop was. Time to rethink my foreach use!

      Thanks

Leave a Reply

Your email address will not be published.