📄 parameterattributes2.vb
字号:
Imports SystemImports System.ReflectionImports Microsoft.VisualBasic.CompilerServicesPublic Class ParameterAttributes2 Shared Function Main() As Integer Return Test(1) End Function Shared Function Test(<OptionCompare()> ByVal value As Integer) As Integer Dim param As parameterinfo Dim method As methodinfo method = CType(methodinfo.getcurrentmethod, methodinfo) param = method.getparameters()(0) If param.isdefined(GetType(OptionCompareAttribute), False) Then Return 0 Else Return 1 End If End FunctionEnd Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -