I am using reflection in my classes to report the classname and method name when an error occurs:
Try
Dim i As Integer = 0
Dim s As String = "wibble"
i = CInt(s)
Catch ex As Exception
ThrowExceptionEx(My.Application.Info.AssemblyName, MethodBase.GetCurrentMethod.DeclaringType.Name, MethodBase.GetCurrentMethod().Name, ex)
End Try
End Sub
But when I obfuscate the code the
MethodBase.GetCurrentMethod.DeclaringType.Name
and
MethodBase.GetCurrentMethod().Name
get mangled. How can I stop obfuscation just on these items?
But when I obfuscate the code the and get mangled. How can I stop obfuscation just on these items?