是的&是.
原文链接:https://www.f2er.com/vb/255539.html它是可能的,并且所有这些都必须是相同的类型,如果你需要传递各种类型使用对象数据类型,然后在函数内取消它们.
使用ParamArray:
' Accept variable number of arguments Function Sum(ByVal ParamArray nums As Integer()) As Integer Sum = 0 For Each i As Integer In nums Sum += i Next End Function ' Or use Return statement like C# Dim total As Integer = Sum(4,3,2,1) ' returns 10
有关更多信息,请参阅this