📄 bizobject.vb
字号:
Imports System
Namespace myComponents
Public Class BizObject
Sub CheckOrder( _
Customer As String, _
Product As String, _
UnitPrice As Double, _
Quantity As Integer, _
State As String )
If Quantity <= 0 Or quantity > 100 Then
Throw New ArgumentException( "Invalid Quantity!" )
End If
If State = "California" And Product="Hair Dryer" Then
Throw New ArgumentException( "Californians cannot own Hair Dryers!" )
End IF
If State = "Washington" Then
unitPrice += unitPrice * .06
End If
Dim myDataObject As New DataObject
myDataObject.SaveOrder( customer, product, unitPrice, quantity, state )
End Sub
End Class
End Namespace
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -