We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Linq template do-while and while loops support

Hello Aspose Support

I am trying to use do-while and while loops, but with no luck.
With code:
<< do >>

<< while [persons<personsCount]>>

I get error “Tag ‘do’ is not well-formed. Token ‘do’ is unexpected”

Does Linq support “do-while” and “while” loops?

Thank you.


We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-22730. We will further look into the details of this requirement and will keep you updated here on the status of the linked ticket.


I am afraid, it is unlikely that we will consider adding of tags to support while and do-while loops in the near future. However, it is possible to use foreach tags for looping even now. You can encapsulate required conditions for stopping of a loop into an Iterable implementation and use it with a foreach tag. Information on using of the tag can be found in the following article:

If you may have issues when implementing Iterable the way you need for looping, then please provide complete details of your use-case/scenario to be able to assist you any further.

@vova.k Due to the provided analysis, we have decided to close this issue as ‘Won’t Fix’.