我正在将代码从代码隐藏移动到类并遇到问题。我有一个制作字符串(html 发票)的方法。在该方法中,创建了最终数量。我想创建一个名为 Invoice 的类,该类将具有方法“CreateInvoice”,该方法将返回一个字符串,并且我还想设置对象的 finalCharge 属性。我已经完成了所有繁重的工作,但是设置课程是我遇到麻烦的部分
Public Class Invoice
Public finalCharge As Double
Public invoiceString As String
Public billingId As Integer
Public clientID As Integer
Public Shared Function CreateInvoice(ByVal bill_id As Integer, ByVal client_id As Integer) As String
... 'create string invoice
... 'tally final charge
End Function
'On my code-behind page.
dim y as string
dim x as Invoice
y = x.CreateInvoice(1225,8855) <-- this line doesn't work.
感谢您帮助解决问题!