I want to create a Tuple using Tuple.Create()
with the type signature of Tuple<String,String,Func<String,Control>>
, but when I do; I get the error:
The type arguments for method 'Tuple.Create<T1,T2,T3>(T1,T2,T3)'
cannot be inferred from the usage. Try specifying the types explicitly.
Here's my code snippet:
public List<Tuple<String, String, Func<string,Control>>> Headers { get; set; } = new List<Tuple<String, String, Func<string,Control>>> {
Tuple.Create("Name","Type", TypeControl),
Tuple.Create("Age","TypeAge", AgeControl),
};
public Control TypeControl(string data = ""){
// code returns a Control
}
public Control AgeControl(string data = ""){
// code returns a Control
}
I want to do this using Tuple.Create()
is it possible without new Tuple<T1,T2,T3>(T1,T1,T3)