.NET KNOWLEDGE BASE BY MANISH PARTEY
I will try to post the solution of the new problem that i will face during my programming experience and will post new topics also.
hi
I will try to post the solution of the new problem that i will face during my programming experience and will post new topics also.
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · Learn .NETCSharp 13 and .NET 9 Scripting Guide (Run .cs Without Projects)Download nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Manish ParteyPosted May 20, 2008, 10:09 PM EDT
protected void Page_Load(object sender, EventArgs e) { bool a = CheckNo(7); } protected bool CheckNo(int number) { bool Flag = true; for (int i = number - 1; i >= 2; i--) { if (number % i == 0) { Flag = false; break; } } return Flag; }