[Mono-list] Generics not working

Gotisch gotisch at gmail.com
Mon Aug 10 08:37:11 EDT 2009

Following code doesnt compile under Mono JIT compiler version 2.4 (tarball So
9. Aug 02:55:46 CEST 2009) but seems to work under .NET are generics
implement in another fashion?
Here the fix seems easy (not using the Singletonholder class just using the
variable directly) but there are other Generics constructs in the app i want
port from .net to mono that also throw errors. 
using System;

namespace test
	public class TestClass<T> where T : new()
		public TestClass()
		public T Instance {
			get { return SingletonHolder<T>.Instance; }	
		static class SingletonHolder<TSingle> where TSingle : new()
			internal static readonly TSingle Instance = new TSingle();

View this message in context: http://www.nabble.com/Generics-not-working-tp24893978p24893978.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list