summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0452-3.cs
blob: f6fbe4375c36449f5002c51a377c037717f18f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// CS0452: The type `int' must be a reference type in order to use it as type parameter `T' in the generic type or method `TestClass<T>'
// Line: 23
using System;

public class TestClass<T> where T : class
{
	static public T meth()
	{
		return null;
	}

	static public T Value;
}			
	
public class Test
{
	public Test()
	{
	}
		
	static public void Main()
	{
		int i = TestClass<int>.meth();
		Console.WriteLine (i);
	}
}