fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. string str = "2,3,4";
  9. string[] arr = str.Split(",");
  10. Console.WriteLine(arr[0] + arr[1] + arr[2]);
  11. int idx = str.IndexOf(",");
  12. string str1 = str.Substring(idx + 1, str.Length-idx-1);
  13. Console.WriteLine(str1);
  14. }
  15. }
Success #stdin #stdout 0.03s 23816KB
stdin
Standard input is empty
stdout
234
3,4