Link to home
Start Free TrialLog in
Avatar of MrTV
MrTVFlag for Thailand

asked on

c# stop running

How can i make a condition in c#

if (count < 10)

then stop running program
using (MySqlCommand cmd = new MySqlCommand("SELECT COUNT( * ) FROM  `member`  WHERE  `tambol` LIKE  '¿¿¿¿¿¿¿' ", conDatabase))
                {
                    try
                    {


                        long count = (long)cmd.ExecuteScalar();
                    

                        Console.WriteLine(count.ToString());

                        if (count < 10)
                        {
                            exit ;
                        }

                    }
                    catch (MySqlException ex)
                    {
                        Console.WriteLine(ex.ToString());
                    }
                }

Open in new window

SOLUTION
Avatar of Kiran Sonawane
Kiran Sonawane
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial