|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
decreasing fordo you know how can I do something like this..
CurValue = 20; //or other value for (int i=CurValue; i >=0; i--) { //do something here } when I compile an error occur and the "underline error mark" is below the "i--" the error is: "Unrecheable code detected (CS0162)" Is possible to do a decreasing for in C# ? Anibal David Acosta F. wrote:
Show quoteHide quote > do you know how can I do something like this.. That code (with an int before the declaration of CurValue) compiles fine for > > CurValue = 20; //or other value > > for (int i=CurValue; i >=0; i--) > { > //do something here > } > > when I compile an error occur and the "underline error mark" is below the > "i--" > the error is: "Unrecheable code detected (CS0162)" > > Is possible to do a decreasing for in C# ? me with no errors or warnings in both VS.NET 2003 and 2005. -- Tom Porterfield
Other interesting topics
ZIP files in C#
Processing Files Not creating an instance How to make unique name given string and collection? Using using verses specifying the namespace completely. decrease for Q: ColumnChanging How to validate fields on the form in C# TreeNode.Find() busted? convert a string to type for passing into a generic |
|||||||||||||||||||||||