从充满随机分布的不同数字的文本框创建字符串数组

Creating string array from a textbox full of randomly distributed different numbers

在可视化 c#project 中,我将文本框转换为字符串并将该字符串拆分为字符串数组。但是数组只能保存整数值,当涉及到小数时它会停止并且永远不会继续与文本框中的其他数字一起使用。我该如何处理。代码是这样的;

string phrase = textBox8.ToString();

            string[] words = new string[100];

            words = phrase.Split((string[])null, StringSplitOptions.RemoveEmptyEntries);

谢谢,

可能你的变量短语应该是:

string phrase = textBox8.Text.ToString();