我無法理解這樣的代碼:這段代碼在Visual Basic中意味着什麼?
SaveFileDialog.InitialDirectory = "C:\"
SaveFileDialog.FileName = "dummy.txt"
SaveFileDialog.Filter = "txt files (*.txt)|*.txt"
If (SaveFileDialog.ShowDialog() = 2) Then
MsgBox("No dummy has been created", MsgBoxStyle.OkOnly)
Else
Dim StreamWriter As StreamWriter = File.CreateText(SaveFileDialog.FileName)
我想知道「2」指在這段代碼的if語句的開頭是什麼。
注意:我沒有寫這段代碼。這是我老師給我們的例子。
@ByteBlast =]感謝提醒 –