I have a string array which contains 4 elements. Which looks like this.
How ever, when trying to do this:
Vector newVector = new Vector(
(float)Convert.ToDouble(words[1]),
(float)Convert.ToDouble(words[2]));
I get the following error:
'Input string was not in a correct format.'
And that is because it's because the value uses a '.' but if I manually change the array to use a ',' it works. How can I easiest replace all '.' with ','.

String.Replaceor other regional setings where decimal separtor is..floattypecasting?Array.ConvertAll(words.Split(','), Double.Parse);This will convert your string array to a double array. In fact I got this from another Stack Overflow[1] question. I hope this solves your problem. [1]: stackoverflow.com/questions/9524682/…