私はvb.netの小さなプログラムで作業していますが、問題には2つのテキストボックスNamesとAge(配列)があります。名前を入力して年齢がわからない場合は、配列に何も追加せずに「年齢を入力してください」と表示されますが、追加情報:文字列 ""からタイプ 'Double'への変換は無効です。 "あなたが何か問題を見ることができるかどうかを確認するために下に私のコードを入れてください。追加情報:文字列 ""からタイプ "Double"への変換は無効です。 Vb.net
PS私は初心者です。そしてありがとう。 「配列の店の Image of what I'm seeing
文字列 として 薄暗い年代薄暗い姓の文字列
としてSurnames = txtNames.Text
Ages = txtAge.Text
If txtNames.Text = "" Then
MsgBox("Enter Name ")
txtNames.Focus()
SystemValueAge = SystemValueAge - 1
SystemValueName = SystemValueName - 1
txtNames.Focus()
ElseIf Ages < 1 Or Ages > 100 Then
MsgBox("Please Enter Valid Age")
SystemValueAge = SystemValueAge - 1
SystemValueName = SystemValueName - 1
txtAge.Focus()
ElseIf txtAge.Text = "" Then
MsgBox("Enter Age")
SystemValueAge = SystemValueAge - 1
SystemValueName = SystemValueName - 1
txtAge.Focus()
End If
「年齢」は文字列です。それを数字と比較することはできません。 – Rob