summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-312.cs
blob: eb1f5abacf6195e8ef9a7e80be79e26b19f953f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Collections.Generic;

class CantCastGenericListToArray
{
	public static void Main(string[] args)
	{
		IList<string> list = new string[] { "foo", "bar" };
		string[] array = (string[])list;
		if (list.Count != array.Length)
		{
			throw new System.ApplicationException();
		}
	}
}