|
1
4
或使用 C#7 :
|
|
|
2
2
使用上述技术
|
|
|
3
-2
您可以用try-catch包围解析,并在catch上(因此,如果用户给出的不是true或false的内容),将输入设置为null。 |