• lua不支持的泛型方法


    1.没有泛型约束

    2.缺少带约束的泛型参数

    3.泛型约束必须为class

     1     /// <summary>
     2     /// 不支持生成lua的泛型方法(没有泛型约束)
     3     /// </summary>
     4     public void UnsupportedMethod1<T>(T a)
     5     {
     6         Debug.Log("UnsupportedMethod1");
     7     }
     8 
     9     /// <summary>
    10     /// 不支持生成lua的泛型方法(缺少带约束的泛型参数)
    11     /// </summary>
    12     public void UnsupportedMethod2<T>() where T : Foo1Parent
    13     {
    14         Debug.Log(string.Format("UnsupportedMethod2<{0}>",typeof(T)));
    15     }
    16 
    17     /// <summary>
    18     /// 不支持生成lua的泛型方法(泛型约束必须为class)
    19     /// </summary>
    20     public void UnsupportedMethod3<T>(T a) where T : IDisposable
    21     {
    22         Debug.Log(string.Format("UnsupportedMethod3<{0}>", typeof(T)));
    23     }
  • 相关阅读:
    luogu 2962 [USACO09NOV]灯Lights
    bzoj 1923
    bzoj 1013
    bzoj 3513
    bzoj 4259
    bzoj 4503
    CF 632E
    bzoj 3527
    bzoj 3160
    bzoj 2179
  • 原文地址:https://www.cnblogs.com/jgsbwcx/p/8972532.html
Copyright © 2020-2023  润新知