c# - 为什么要编译? —> int foo = foo = 5;

标签 c#

为什么这一行可以编译?

int foo = foo = 5;

我在我维护的系统中发现了它,但无法理解它的用途。

最佳答案

没有目的。它相当于:

int foo = 5;

关于c# - 为什么要编译? —> int foo = foo = 5;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22041015/

相关文章:

c# - 如何在导入数据库之前验证列

c# - 无法使用 SmtpClient 发送邮件

c# - 统一: How to find all neighbors recursively (neighbors of neighbors)?

C# 最小最大图形搜索

c# - Include() ThenInclude() 在 Table Per Hierarchy 策略中抛出 "Sequence contains more than one matching element"异常

c# - 依赖属性更改时 StackPanel 可见性未更新

c# - 应该如何实现 DbContext 和与 DB 的连接来处理负载测试?

javascript - 使用 HTTP POST 的 AWS S3 浏览器上传提供无效签名

c# - 有没有更好的方法来返回列表中的下一项并从末尾循环到前面?

c# - 如何判断 IQueryable 是否为 IOrderedQueryable?