using System.Collections.Generic; namespace ICSharpCode.Decompiler.Tests.TestCases.Ugly { internal class NoNewOfT where TOnType : new() { public static TOnType CreateTOnType() { return new TOnType(); } public static T CreateUnconstrainedT() where T : new() { return new T(); } public static T CreateClassT() where T : class, new() { return new T(); } public static T CollectionInitializer() where T : IList, new() { return new T() { 1, 2, 3, 4, 5 }; } } }