Your Products have been synced, click here to refresh
I read up on MSDN's definition of the for loop (here: http://msdn.microsoft.com/en-us/library/ch45axte.aspx), and supposedly the loop initialization is only evaluated once. If that were true, there would be no performance difference between the following loops:
//Test loop 1 for (int i = 1; i < pcd.Commands.Count; i++) { } //Test loop 2 int cmdCnt = pcd.Commands.Count; for (int i = 1; i < cmdCnt; i++) { }
I read up on MSDN's definition of the for loop (here: http://msdn.microsoft.com/en-us/library/ch45axte.aspx), and supposedly the loop initialization is only evaluated once. If that were true, there would be no performance difference between the following loops:
//Test loop 1 for (int i = 1; i < pcd.Commands.Count; i++) { } //Test loop 2 int cmdCnt = pcd.Commands.Count; for (int i = 1; i < cmdCnt; i++) { }
© 2025 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |