Using Color As Optional Parameter In a function within a class
问题 How can I declare an optional color parameter in some function or sub, as if I do that in the normal way (I mean to give some default color for that optional parameter) as the vb.net compiler complains that there is some error in that code. How do I resolve this issue. Sample code below: Public Shared Function SomeFunction(ByVal iParam As Integer, Optional ByVal oColor As Color = Color.Black) End Function The compiler does not accept '=Color.Black' 回答1: MSDN says about Optional Parameters for