Skip to content

Commit b4b649c

Browse files
author
Per Gårdebrink
committed
Remove constraint on T for ParseArguments with factory
1 parent 3760d03 commit b4b649c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/CommandLine/Parser.cs

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ public ParserResult<T> ParseArguments<T>(IEnumerable<string> args)
116116
/// and a sequence of <see cref="CommandLine.Error"/>.</returns>
117117
/// <exception cref="System.ArgumentNullException">Thrown if one or more arguments are null.</exception>
118118
public ParserResult<T> ParseArguments<T>(Func<T> factory, IEnumerable<string> args)
119-
where T : new()
120119
{
121120
if (factory == null) throw new ArgumentNullException("factory");
122121
if (!typeof(T).IsMutable()) throw new ArgumentException("factory");

0 commit comments

Comments
 (0)