1Imports System 2Imports System.Reflection 3 4Public Class ParameterAttributes1 5 Shared Function Main() As Integer 6 Return Test() 7 End Function 8 9 Shared Function Test(ByVal ParamArray p() As Object) As Integer 10 Dim param As parameterinfo 11 Dim method As methodinfo 12 13 method = CType(methodinfo.getcurrentmethod, methodinfo) 14 param = method.getparameters()(0) 15 16 If param.isdefined(GetType(paramarrayattribute), False) Then 17 Return 0 18 Else 19 Return 1 20 End If 21 End Function 22End Class