[Mono-devel-list] VB.NET runtime

Raja R Harinath rharinath at novell.com
Mon Jul 19 23:15:33 EDT 2004


Hi,

"A Rafael D Teixeira" <rafaelteixeirabr at hotmail.com> writes:

> Rob.Tillie at Student.tUL.EDU writes:
>
>>Didn't someone say we only needed a custom attribute to emit the IL needed
>>for an optional parameter?

That already exists.  It's called [Optional].

> That is true, but what is missing is how to create the defaultvalue
> metadata. That feature is not available as an attribute. There are
> attributes to govern how non-simple values (DateTimes and Decimals, for
> example) are stored as default values, but not to say the default value
> itself.
>
> The problem is that lots of optional parameters in MS.VB.dll do have
> some default value to substitute in the call when it is omitted
> (concepts inherited from COM/VB6).That is why we are
> looking at ways to solve it.

Yep.  And, I had earlier suggested a MCS-specific attribute for this.  I
guess Rob and Jambu were referring to that.  I think suggested we
special-case an internal attribute, named, say

  Microsoft.VisualBasic.Mono__DefaultValueAttribute 

that is used only in the MS.VB.dll sources, and which is specially
understood by our MCS or corlib to provide the default value.

- Hari



More information about the Mono-devel-list mailing list