Use IList
or IEnumerable
instead of List
in method parameters
#605
Labels
status: help wanted
requesting help from the community
type: community enhancement
feature request not on Twilio's roadmap
There may be a reason
List<T>
is used instead ofIList<T>
orIEnumerable<T>
, but I'd like to be able to pass in other types of collection classes, specificallyT[]
.For example, here's a snippet that generates TwiML that will gather some input:
It works fine, but if the
input
parameter would acceptIList<Gather.InputEnum>
orIEnumerable<Gather.InputEnum>
, we could pass in an array instead:This is super minor, but this would make the APIs a little more flexible and allow developers to write shorter/less verbose code IMO.
This isn't the only location
List<T>
is specified, so I'd like to see it changed, if possible, wherever :)The text was updated successfully, but these errors were encountered: