Reputation: 3829
I have two objects myObject1
and myObject2
, in myObject1 I have the following method:
public static implicit operator myObject2(myObject1 param)
{ //Some Code }
How can I cast an IEnumerable<myObject1>
to IEnumerable<myObject2>
?
Upvotes: 0
Views: 68
Reputation: 78840
Try provoking a cast on each item:
IEnumerable<myObject1> original;
// ...
IEnumerable<myObject2> converted = original.Cast<myObject2>();
Upvotes: 2