I have an assembly containing a class with a function of this signature (VB):
Public Overridable Function GetAccounts(ByRef Optional UseSingleAccount As Boolean = False) As String() Whenever I modify the assembly with Mono.Cecil 0.6, the parameter constant (False) gets lost. The new signature (disassembled using Reflector) looks like this: Public Overridable Function GetAccounts(ByRef Optional UseSingleAccount As Boolean = Nothing) As String() This is true even if I do not modify anything about the assembly (i.e., just call AssemblyFactory.GetAssembly then AssemblyFactory.SaveAssembly, without anything in between). Additionally, Visual Studio gives me this error when I try to override the function: 'Public Overrides Function GetAccounts([ByRef UseSingleAccount As Boolean = False]) As String()' cannot override 'Public Overridable Function GetAccounts([ByRef UseSingleAccount As Boolean = Nothing]) As String()' because they differ by the default values of optional parameters. If I change my overriding signature to use Nothing as the parameter constant, Visual Studio crashes. Is this a known bug with Mono.Cecil? Thanks, Dave --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
