这个问题是关于我试图实例化的另一个实例...我必须从我的Cardreader类中获取"Read“函数,并在form1.vb上返回一个字符串。现在我做了我记得的事情,但由于某些原因,我的支架出现了问题……我能做些什么来解决这个问题呢?
Form1.vb
ThisATM.getCardReader.Readr("TEST TEXT IS FUN")CardReader.vb
Public Function Readr(ByVal card As KeyCard) As String
Return Read
End FunctionLink for the image of the card reader function. I thought this link of the image of the code would be easier to understand.
发布于 2011-11-23 17:44:25
Readr函数接受KeyCard作为参数,而不是字符串。因此,您似乎必须为KeyCard创建一个实例,并将其用作参数。在您提供的图像中的代码中,您正在创建一个keycard对象,您似乎应该在Readr函数中使用该对象,如下所示:
Dim ThisKeyCard as new KeyCard("1234","5678","Mikki Monster")
Dim returnString as string=ThisATM.getCardReader.Readr(ThisKeyCard)https://stackoverflow.com/questions/8237368
复制相似问题