概述
直接按字符串方式取出,则会多了一对双引号(" "),查了些资料,有人说是编码问题,但是我没有找到。如果有人知道的,请留言告知一下,谢谢。
public static string GetValueString(string key)
{
using (IRedisClient redis = PooleClient.GetClient())
{
return redis.GetValue(key);
}
}
解决方法:把GetValue换成泛型string,解决此问题。
public static string GetValueString(string key)
{
using (IRedisClient redis = PooleClient.GetClient())
{
return redis.Get<string>(key);
}
}
最后
以上就是淡然小蝴蝶为你收集整理的redis 存储字符串多双引号 问题【解决】的全部内容,希望文章能够帮你解决redis 存储字符串多双引号 问题【解决】所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复