Issues when using reflection and Obfuscation

mattwilkinsonmattwilkinson Posts: 2
edited November 7, 2013 8:35AM in SmartAssembly
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?
Sign In or Register to comment.