fork(3) download
  1. using System;
  2. using System.Text;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. public class Program
  7. {
  8.  
  9. public static void Main(string[] args)
  10. {
  11. List<string> a = new List<string>(){"A","B","C","D"};
  12. if(a.Count > 1)
  13. a.RemoveAt(a.Count-2);
  14.  
  15. Console.Write(string.Join(",", a.ToArray()));
  16. }
  17. }
Success #stdin #stdout 0.02s 33912KB
stdin
Standard input is empty
stdout
A,B,D