Using the generic type "System.Collections.Generic.List <T>" requires arguments of type "1"
I am trying to create a program that will create a vector, generate 100 random numbers (0 - 99), and then ask user input if they want to sort numbers from high to low or from low to high.
This is the code I'm still trying to get the vector to work.
using System;
using System.Collections.Generic;
using System.Collections.Generic.List; //this is where the error comes.
using System.Linq;
using System.Text;
namespace System.Collections.Generic
{
class List<T>
{
static void Main(string[] args)
{
List<int> vectorList = new List<int>();
vectorList.Capacity(100);
int i = 100;
for (int x = 0; x <= 100; x++)
{
Random rand = new Random();
i = rand.Next(0, 100);
vectorList.Add(i);
Console.WriteLine(i);
}
}
}
}
Except that I have no idea how to fix this problem, any help would be greatly appreciated.
+5
5 answers