c# - Collecting types that implement a particular interface without casting? -
Actually, I want to know that in all the special namespaces, all types of specific interface such as IEnumerable apply We do.
I know what I can do:
foreach type ... if type is IEnumerable ... But I do not want to type just to type if it applies an interface, because the artist will be thrown in any way.
is is not an artist, it is an exam, which you like looks like. Casting typing in C # is either done using forced clipping operators (name?): Or Safe Casting Operator:
(IEnumerable someCollection)
IEnumerable as some Convolance
Comments
Post a Comment