using System.Collections.Generic;
using System.Collections.Specialized;
public static void Main()
var m1 = Parse<Model>(new NameValueCollection {
var m2 = Parse<Model>(new NameValueCollection {
["Birthday"] = "2000-1-1"
static T Parse<T>(NameValueCollection args) {
Type type = args.GetType();
var m = type.GetMethods(BindingFlags.Public);
var p = v.GetParameters();
data[a.Name] = args[a.Name];
public string Name { get; set; }
public int Age { get; set; }
public DateTime? Birthday { get; set; }
public override string ToString() {
: $"${Name} (${Age}) - ${Birthday:yyyy-MM-dd}";