我如何分配List< Product> p = asp .net C#中的Cache [" Product]? [英] How Can I assign List<Product> p=Cache["Product] in asp .net C# ?

查看:61
本文介绍了我如何分配List< Product> p = asp .net C#中的Cache [" Product]?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想这样做,



I want to do like this,

List<Products> p=Cache["Product"];





帮帮我怎样才能做到这一点。



提前致谢



Help me how can i do this.

Thanks in advance

推荐答案

您需要转换类型。



You need to cast the type.

List<products> p=Cache["Product"] as List<products>;


这篇关于我如何分配List&lt; Product&gt; p = asp .net C#中的Cache [&quot; Product]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆