parameterattributes1.vb

来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 22 行

VB
22
字号
Imports SystemImports System.ReflectionPublic Class ParameterAttributes1    Shared Function Main() As Integer        Return Test()    End Function    Shared Function Test(ByVal ParamArray p() As Object) As Integer        Dim param As parameterinfo        Dim method As methodinfo        method = CType(methodinfo.getcurrentmethod, methodinfo)        param = method.getparameters()(0)        If param.isdefined(GetType(paramarrayattribute), False) Then            Return 0        Else            Return 1        End If    End FunctionEnd Class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?