提交 f17216bb 编写于 作者: D David Kean

Merge pull request #6617 from AmadeusW/fix2127

Corrects the ConvertToAutoPropertyCS sample
......@@ -57,10 +57,10 @@ public override SyntaxNode VisitPropertyDeclaration(PropertyDeclarationSyntax pr
public override SyntaxNode VisitFieldDeclaration(FieldDeclarationSyntax field)
{
// Retrieve the symbol for the field
// Retrieve the symbol for the field's variable
if (field.Declaration.Variables.Count == 1)
{
if (object.Equals(semanticModel.GetDeclaredSymbol(field), backingField))
if (object.Equals(semanticModel.GetDeclaredSymbol(field.Declaration.Variables.First()), backingField))
{
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册