- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
public class Parameter
{
public string Name { get; }
public int Value { get; }
private Parameter(string name, int value)
{
Name = name;
Value = value;
}
public static Func<int, Parameter> GetDeferredConstructor(string name)
{
return value => new Parameter(name, value);
}
}
public class Program
{
public static void Main(string[] args)
{
var dc = Parameter.GetDeferredConstructor("param");
var p = dc(5);
}
}