dotnet/roslyn

Inline temporary variable with multiple assignments

开放

#34,753 创建于 2019年4月4日

 (3 条评论) (0 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-IDEBugIDE-CodeStylehelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

Version Used: Visual Studio 2019 version 16.0

Steps to Reproduce:

var x = 3;
x = x + 2;
Console.WriteLine(x);

Apply Inline temporary variable on the definition of x.

Expected Behavior:

var x = 3 + 2;
Console.WriteLine(x);

Actual Behavior:

var x = 3;
x = 3 + 2;
Console.WriteLine(3);

贡献者指南