Convert to IEnumerable?

前端 未结 4 1107
别那么骄傲
别那么骄傲 2021-02-14 13:13

I wrote this extension method :

public static class A
{
 public static IEnumerable AsDynamic(this IEnumerable f)
    {
                 


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 13:53

    Because dynamic is not a type

    Console.WriteLine(typeof(dynamic)); // error
    

    dynamic just resolves the actual type at runtime

提交回复
热议问题