Using C#, VS2019 and VA 2358 I have set up the following simple test case for this:
class TestFelineParts
{
public int Parts { get; set; }
public int TotalPieces { get; set; }
}
class feline_test_general
{
private void testingIntVariableBrackets()
{
TestFelineParts parts = new TestFelineParts { Parts = 5, TotalPieces = 3 };
TestFelineParts bp = new TestFelineParts { Parts = 2, TotalPieces = 1 };
int partsAlreadyProduced;
// test - select just the piece of code "(parts.Parts < 0)" and trigger
// VA Introduce Variable. Dialog prompts with:
// bool name
partsAlreadyProduced = (parts.Parts < 0) ? bp.TotalPieces - parts.Parts : parts.Parts;
}
}
here VA works as expected. Can you please try this simple case in your solution, and see if it behaves the same? I am guessing that you will see the same results I did with this test code. In this case I am also guessing somehow VA is confused about the type of "parts.Parts" in this part of your code, but without checking what VA has to say when the caret is placed onto this variable, it is hard to know.