|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
decrease fordo you know how can I do something like this..
CurValue = 20; //or other value for (int i=CurValue; i >=0; i--) { } You just did it, didn't you? :)
Your code is perfectly fine except you didn't declare the type of CurValue. HTH, Kent Show quoteHide quote "Anibal David Acosta F." <a*@pla.net.py> wrote in message news:e3eaOLKRGHA.1096@TK2MSFTNGP11.phx.gbl... > do you know how can I do something like this.. > > CurValue = 20; //or other value > > for (int i=CurValue; i >=0; i--) > { > > } > But when I compile I have an error that says: "Unrecheable code detected
(CS0162)" and the error mark is under the "i--" :( thanks for your timeShow quoteHide quote "Kent Boogaart" <ken***@internode.on.net> escribió en el mensaje news:OPi2SPKRGHA.3916@TK2MSFTNGP11.phx.gbl... > You just did it, didn't you? :) > > Your code is perfectly fine except you didn't declare the type of > CurValue. > > HTH, > Kent > > "Anibal David Acosta F." <a*@pla.net.py> wrote in message > news:e3eaOLKRGHA.1096@TK2MSFTNGP11.phx.gbl... >> do you know how can I do something like this.. >> >> CurValue = 20; //or other value >> >> for (int i=CurValue; i >=0; i--) >> { >> >> } >> > > really is a warning, but I don't undestand why?
There is another way to do that? thanks Show quoteHide quote "Kent Boogaart" <ken***@internode.on.net> escribió en el mensaje news:OPi2SPKRGHA.3916@TK2MSFTNGP11.phx.gbl... > You just did it, didn't you? :) > > Your code is perfectly fine except you didn't declare the type of > CurValue. > > HTH, > Kent > > "Anibal David Acosta F." <a*@pla.net.py> wrote in message > news:e3eaOLKRGHA.1096@TK2MSFTNGP11.phx.gbl... >> do you know how can I do something like this.. >> >> CurValue = 20; //or other value >> >> for (int i=CurValue; i >=0; i--) >> { >> >> } >> > > "Anibal David Acosta F." <a*@pla.net.py> wrote in message Cut/Paste the actual code that is giving you the problem.news:uUnh5WKRGHA.5036@TK2MSFTNGP12.phx.gbl... > really is a warning, but I don't undestand why? > There is another way to do that? > If you can, try to copy the offending piece to a small program that demonstrates the error you are getting. Bill
Other interesting topics
ZIP files in C#
c# CP210x Wrapper InteropServices IntPtr HandleRef problem Processing Files Not creating an instance How to make unique name given string and collection? Using using verses specifying the namespace completely. Q: ColumnChanging How to validate fields on the form in C# TreeNode.Find() busted? convert a string to type for passing into a generic |
|||||||||||||||||||||||