Dave
unread,Jun 15, 2009, 4:04:38 PM6/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mono-cecil
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