I get rid of the code for all compiler warnings, as is the case with my boss when I came across some unused local variables. Naturally, I deleted those that were legal, but I came across a couple that is not so straightforward. (Changed names changed for security)
Dim strAAA As String = "aaaa" & strBBB & Now.ToString("yyyyMMddHHmmss") & ".doc" If FUNCTION_NAME(strCCCC, strAAA) Then Return True
strAAA is supposedly a "unused local variable" when it is explicitly used immediately below.
Even when I write it as follows:
Dim strAAA As String strAAA = "ViewLet" & strBBB & Now.ToString("yyyyMMddHHmmss") & ".doc" If FUNCTION_NAME(strTmpFileName, strAAA) Then Return True
A warning is still present.
Can anyone solve this mystery?
user3429738
source share