如何在Windows窗体应用程序中3次错误登录尝试后关闭应用程序 [英] how to close application after 3 wrong login tries in windows form application
本文介绍了如何在Windows窗体应用程序中3次错误登录尝试后关闭应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Windows窗体应用程序中,如何在3次错误登录尝试后关闭特定应用程序..
需要代码
In windows form application,how to close the particular application after 3 wrong login tries..
Need code for that
推荐答案
c#如何关闭应用。 3次错误登录尝试后 [ ^ ]
你好
你只拿一个整数变量例如int count = 0
每次错误的尝试都会增加变量值,如计数++
if(count> ; 3)
{
Application.Exit();
}
Happy Coding
谢谢
Abhimanyu
Hello
you just take one integer variable for e.g. int count=0
every wrong attempt just increase the variable value like count++
if(count >3)
{
Application.Exit();
}
Happy Coding
Thanks
Abhimanyu
你好
当wrong_attempt计数等于3时,您可以使用 Application.Exit()关闭Windows应用程序。
问候
Willington
Hi
You can close the Windows Application using Application.Exit() when the wrong_attempt count is equal to three.
Regards
Willington
这篇关于如何在Windows窗体应用程序中3次错误登录尝试后关闭应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文