Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

LIST in C#

A List can be initiated as
  1. List<datatype> list = new List<datatype>();


A List can be added with values as
  1. list.Add(value);


Example:
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace forgetCode
  5. {
  6. class program
  7. {
  8. public static void Main()
  9. {
  10. List<int> list = new List<int>();
  11. list.Add(1);
  12. list.Add(2);
  13. list.Add(3);
  14. list.Add(4);
  15. }
  16. }
  17. }