the while bend is a lot of generally acclimated to echo a account or a block of statements for a amount of times that is not accepted afore the bend begins. Usually, a account central the while bend ’ s physique will set a Boolean banderole to apocryphal on a assertive iteration. A while bend will analysis a action and afresh continues to assassinate a block of cipher as continued as the action evaluates to a boolean amount of true. When the boolean announcement evaluates to true, the statements will execute. Once the statements accept executed, ascendancy allotment to the alpha of the while bend to analysis the boolean announcement again.
The While Loop: WhileLoop.cs
using System;
class WhileLoop
{
public static void Main()
{
int myInt = 0;
while (myInt < 10)
{
Console.Write("{0} ", myInt);
myInt++;
}
Console.WriteLine();
}
}
Interview Questions: Implement Same Name Method of two Interfaces in a Class using C#
-
This is most famous question in OOPs programming. if you have two
interfaces and driving a class and these two interfaces have the same name
method then ...
0 comments:
Post a Comment