Can i create a workflow have the same variable name in if or else. For example, i have created a logic to go either if or else. Under if sequence, i will store a variable name invoice number and else i wan to store a variable same as if sequence where the name is invoice number. Is this possible and will it cause a issue?
string invoiceNumber;
if (condition)
{
invoiceNumber = "12345"; // Variable 'invoiceNumber' in 'if' block
}
else
{
invoiceNumber = "67890"; // Variable 'invoiceNumber' in 'else' block
}
Console.WriteLine(invoiceNumber); // Outputs the value of 'invoiceNumber' based on the condition