Method with generic return type but not generic input. Is this possible?
问题 Suppose we have a NodeData class: public class NodeData<T> { public string Name; public T Value; public NodeData(string name, T value) { this.Name = name; this.Value = value; } } And a base Node class and child classes that have several properties with type NodaData : public class Node { public List<NodeData<T>> listOutputs<T>() { var fieldInfos = GetType().GetFields(); var list = new List<NodeData<T>>(); foreach (var item in fieldInfos) { Type t = item.FieldType; string name = item.Name; if