C#C
C#4y ago
Ted Bunny

Type as Parameter, and string[] from Linq

private static string[] GetRolls(AgentHitbox agentHitbox, Type type) =>
  agentHitbox.agent.GetTraits<type>().Select(t => t.Rolls);
1. How can I use type this way? Typeof(type) didn't work either.
  1. Rolls is a string[]. I need to concatenate it from the series but I haven't done that in Linq before. How do?
Was this page helpful?