The type arguments cannot be inferred from the usage. Try specifying the type arguments explicitly

后端 未结 8 1844
灰色年华
灰色年华 2020-12-14 06:21

Could someone please clarify something for me. In my ASP.NET MVC 2 app, I\'ve got a BaseViewModel class which includes the following method:

pu         


        
相关标签:
8条回答
  • 2020-12-14 06:49

    In case it helps, I've ran into this problem when passing null into a parameter for a generic TValue, to get around this you have to cast your null values:

    (string)null
    
    (int)null
    

    etc.

    0 讨论(0)
  • 2020-12-14 06:53

    I had this same problem, my solution:
    In the web.config file :

    <compilation debug="true>
    had to be changed to
    <compilation debug="true" targetFramework="4.0">

    0 讨论(0)
提交回复
热议问题