Skip to content

Commit 5dcaed8

Browse files
committed
C#: Add string interpolation examples to cs/useless-assignment-to-local.
1 parent cc73205 commit 5dcaed8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

csharp/ql/test/query-tests/Dead Code/DeadStoreOfLocal/DeadStoreOfLocal.cs

+10
Original file line numberDiff line numberDiff line change
@@ -474,3 +474,13 @@ public static void M()
474474
}
475475
}
476476
}
477+
478+
class StringInterpolation
479+
{
480+
void Pi()
481+
{
482+
float pi = 3.14159f; // GOOD
483+
const int align = 6; // GOOD
484+
Console.WriteLine($"Pi, {pi,align:F3}");
485+
}
486+
}

0 commit comments

Comments
 (0)