我无法理解这段代码:
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)
我想知道这段代码中 If 语句开头的“2”是什么意思。
注意:这段代码不是我写的。这是我的老师给我们的一个例子。