using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
string result;
Console.WriteLine("请输入用户名");
string name = Console.ReadLine();
Console.WriteLine("请输入密码");
string password = Console.ReadLine();
if (Test(name, password, out result))
{
Console.WriteLine(result);
}
else
{
Console.WriteLine(result);
}
Console.ReadKey();
} static bool Test(string name, string password, out string result)
{
if (name == "admin" && password == "")
{
result = "登录成功";
return true;
}
else if (name == "admin")
{
result = "密码错误";
return false;
}
else
{
result = "用户名错误";
return false;
}
}
}
}

最新文章

  1. [转载]Javascript异步编程的4种方法
  2. dp 动态规划 hdu 1003 1087
  3. ADB连不上,ADB server didn't ACK问题,的解决
  4. iOS中NSUserDefaults详解
  5. MySQL设置字符集CHARACTER SET
  6. dubbo源码之二——dubbo入口
  7. mysql 二进制安装文件 下载
  8. 深入理解asp.net SessionState
  9. mysql忘记root密码 + 授权登录
  10. poj1182 并查集
  11. EasyUI - ComboBox 下拉组件
  12. ucos任务控制块详解
  13. bisect 二分查找
  14. [原创软件]Maya报错窗口监测器
  15. CentOS7安装k8s
  16. js 检测变量是否存在
  17. FiDDLER教程
  18. 【第五课】LNMP环境的入门
  19. phpredisadmin 莫名其妙错误,打开了无法显示任何数据
  20. python中如何去掉unicode编码前面的u?

热门文章

  1. BZOJ 1668: [Usaco2006 Oct]Cow Pie Treasures 馅饼里的财富( dp )
  2. HTML+CSS笔记 CSS进阶再续
  3. Aptana jQuery自动提示
  4. golang并发编程
  5. Spring Cache使用详解
  6. 在Spring Boot启动后执行指定代码
  7. HDU 2104 hide handkerchief
  8. C# windows ce编程-----我的第一次
  9. swjtu 1962 A+B(模拟)
  10. HDU 3032 Nim or not Nim? (sg函数求解)