1. While Loop
This Loop is checking the condition written in brackets , if the condition is correct then Code block will be executed till the While condition is fulfilled.
Note: While is similar to NAVISION IF condition.
Note: While is similar to NAVISION IF condition.
2. Do While Loop
do
{
}
while(Condition);
This loop will execute once and then checks the condition if condition is found true then do code will be executed again.
Note : This code is good for providing menu option to end user of program.
{
}
while(Condition);
This loop will execute once and then checks the condition if condition is found true then do code will be executed again.
Note : This code is good for providing menu option to end user of program.
3. For Loop
For Loop is also present in NAV and the working is same as in Dotnet. I had summarized the syntax for all loops present in Dotnet.
4. For Each Loop
This loop is present in dotnet and is very easy to use with collection classes in nav.
Break & Continue:
Break is a very special type of keyword that we can use in any loop to break on condition.
Continue is also same and is used for special reasons to continue a loop.
No comments:
Post a Comment