09 2021 档案
摘要:& 和 && 都可以用作逻辑与运算符,表示 and。当运算符两边的表达式的结果都为 true 时,整个运算结果才为 true。否则,只要有一方为 false,则结果为 false。 不过,&& 具有短路的功能,如下案例显示,第一个函数返回 false,则不再运行后面的函数。 class Progra
阅读全文
摘要:编辑 appsettings.json "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information", "Microso
阅读全文
摘要:1. 建立索引 在经常需要进行检索的字段上创建索引,如 WHERE,JOIN ,ORDER BY。 索引并不是越多越好。索引固然可以提高相应的 select 效率,但同时也降低了 insert 及 update 的效率,因为 insert 或 update 时有可能会重建索引。 避免在索引上使用计算
阅读全文
摘要:实现代码: public static string GetLocalIPAddress() { var host = Dns.GetHostEntry(Dns.GetHostName()); foreach (var ip in host.AddressList) { if (ip.Address
阅读全文

浙公网安备 33010602011771号