Issues when using reflection and Obfuscation
mattwilkinson
Posts: 2
I am using reflection in my classes to report the classname and method name when an error occurs:
But when I obfuscate the code the
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.Nameand
MethodBase.GetCurrentMethod().Nameget mangled. How can I stop obfuscation just on these items?
Comments