[英]How can I have a sub that accepts a variable as byref without declaring what type of variable it is?
我如何擁有一個接受變量作為byref的子程序,而又不聲明它是什么類型的變量(它可以是int,string等),但是仍然定義了一些其他參數?
我想要一個這樣的子:
Private Sub example(ByRef variable, ByRef reader as MySqlDataReader, ByVal columnName as String)
您可以創建一個通用方法:
Private Sub Example(Of T)(ByRef variable As T, ByRef reader as MySqlDataReader, ByVal columnName as String)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.