English 中文(简体)
证明职能
原标题:Instantiating a function

This question is about a different instance that im trying to instantiate... I have to get the "Read" function from my Cardreader class and return a string to it on the form1.vb .... Now i did what i can remeber but for some reason i m having a problem with the brackets.... What can i do to fix this?

表格1.vb

ThisATM.getCardReader.Readr("TEST TEXT IS FUN")

CardReader.vb

Public Function Readr(ByVal card As KeyCard) As String
        Return Read
    End Function

Link for the image of the card reader function. I thought this link of the image of the code would be easier to understand.

问题回答

阅读功能将钥匙Card作为参数,而不是直线。 因此,似乎你们必须树立一个关键人物的榜样,而是把它当作一个参数。 在你提供的图像中,你正在制造一个关键卡片物体,似乎你在阅读器功能中应当使用该物体:

Dim ThisKeyCard as new KeyCard("1234","5678","Mikki Monster")
Dim returnString as string=ThisATM.getCardReader.Readr(ThisKeyCard)




相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签