c# - Rider“表达式总是错误的”按位警告和
问题描述
为什么 Rider 会"Expression is always false"
在以下代码中发出警告?
bool b = (await Method1()) &
(await Method2()) &
(await Method3());
Method1 和 Method2 和 Method3 是一样的。
private async Task<bool> Method1()
{
return true;
}
解决方案
推荐阅读
- spatstat - mppm 和 Geyer-Hardcore 混合交互的两个问题
- python - gridspec hspace 在使用 cartopy 时留下很大的空白
- php - 如何使用 lastinsertid、LAST_INSERT_ID 将记录插入两个表(PHP MYSQL)
- java - 在 Android 上触摸通知时如何导航到特定的 React 组件?
- python - 嵌套级别重新排列为 1 级的字典
- rust - 您如何从采用 &mut self 的方法中调用存储在结构中的 Future 的 future::select?
- python - 如何在matplotlib中标记总金额的一部分?
- javascript - MongoDB首先将某些文档排序到顶部
- node.js - 可以使用“Speccy”将 2 个不同的网站 OpenApi 合并到一个文件中吗?
- azure-active-directory - 如何获取访问令牌以提取特定订阅的 Azure Monitor 指标?