⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataobject.vb

📁 asp.net技术内幕的书配源码
💻 VB
字号:
Imports System
Imports System.IO

Namespace myComponents

Public Class DataObject

  Sub saveOrder( _
    Customer As String, _
    Product As String, _
    UnitPrice As Double, _
    Quantity As Integer, _
    State As String )

    Dim strPath As String = "c:\orders.txt"
    Dim strmFile As StreamWriter

    strmFile = File.AppendText( strPath )
    strmFile.Write( "customer: " & customer & Environment.NewLine )
    strmFile.Write( "product: " & product & Environment.NewLine )
    strmFile.Write( "unit price: " & unitPrice.ToString() & Environment.NewLine )
    strmFile.Write( "quantity: " & quantity.ToString() & Environment.NewLine )
    strmFile.Write( "state: " & state & Environment.NewLine )
    strmFile.Write( "=============" & Environment.NewLine )
    strmFile.Close
  End Sub

End Class

End Namespace

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -