Why Won't This Work?

I want to convert an int into a string then combine the first and last character together.

temp = seed.ToString();
temp2 = temp.Substring[0, 0] + temp.Substring[temp.length, 0];

For some reason I get this error: Internal compiler error: Array index is out of range…

For example if the “seed” variable was 12345, then “temp2” should be equal to 15.

You have the wrong bracket type for the substring method… you need to use “(” & “)” not “[” & “]”

  temp = seed.ToString();
  temp2 = temp.Substring(0, 1) + temp.Substring(temp.length, 0);