输入的字符串格式不正确

输入的字符串格式不正确

本文介绍了输入的字符串格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

int selcetedComboValue = Int32.Parse(comboBox1.SelectedItem.ToString());

推荐答案

string[] splitValues = Int32.Parse(comboBox1.SelectedItem.Split('-');
int firstValue = Int32.Parse(splitValues[0]);
int firstValue = Int32.Parse(splitValues[1]);



希望有帮助.
Milind



Hope that helps.
Milind




这篇关于输入的字符串格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 20:38