J
Jens Thiel
Hi all, I would like to exactly mimic the following VB.NET interface
Public Shared Function Fun( _
Optional ByVal p As Integer = 10 _
) As Double()
in C#. I already use OptionalAttribute from System.Runtime.InteropServices.
I tried to combine it with DefaultValueAttribute from System.ComponentModel
but the result is not the same. How do I set the default value in the same
way VB.NET does?
(I do not want to overload or discuss overloads ./. optional parameters ;-)
Public Shared Function Fun( _
Optional ByVal p As Integer = 10 _
) As Double()
in C#. I already use OptionalAttribute from System.Runtime.InteropServices.
I tried to combine it with DefaultValueAttribute from System.ComponentModel
but the result is not the same. How do I set the default value in the same
way VB.NET does?
(I do not want to overload or discuss overloads ./. optional parameters ;-)