在路上

导航

随笔分类 -  .NET

大数据时遇到的问题
摘要:十月一后正式接管金币交易服务,到最后基本使之稳定用了不到两个月。当时交易量平均每天5万条。 接管的算是一个不太好的摊子,十月一期间还出现了某几个消费者服务挂了的现象,并且基本每天都产生一堆错误log,但是金币交易的整个流程我认为是没有问题的。 所以整个解决过程基本上围绕如何让错误log消失,log是 阅读全文

posted @ 2015-11-13 22:44 Clarence Yang 阅读(647) 评论(0) 推荐(0)

Possible multiple enumeration of IEnumerable
摘要:Consider the following code snippet:IEnumerable names = GetNames(); foreach (var name in names) name.Sur="Jim";foreach (var name in names) Console.Wr... 阅读全文

posted @ 2013-05-22 21:10 Clarence Yang 阅读(689) 评论(2) 推荐(0)

.Net 中的序列化与反序列化
摘要:.Net 中的序列化与反序列化 一、概述 当两个进程在进行远程通信时,彼此可以发送各种类型的数据。无论是何种类型的数据,都会以二进制序列的形式在网络上传送。发送方需要把这个对象转换为字节序列,才能在网络上传送;接收方则需要把字节序列再恢复为对象。 把对象转换为字节序列的过程称为对象的序列化。 把字节序列恢复为对象的过程称为对象的反序列化。二、对象的序列化主要有两种用途: 1)把对象的字节序列永久地保存到硬盘上,通常存放在一个文件中; 我们经常需要将对象的字段值保存到磁盘中,并在以后检索此数据。尽管不使用序列化也能完成这项工作,但这种方法通常很繁琐而且容易出错,并且在需要跟踪对象的层次结构时,会 阅读全文

posted @ 2011-02-23 23:09 Clarence Yang 阅读(267) 评论(0) 推荐(0)

Why does List<T> need to inherit IList<T> and IList interfaces at the same time?
摘要:To support backward compatibility向后兼容For example, if the List<T> class implemented only the IList<T> interface, no code could consider a List<DateTime> object an IList.And interfaceIList is explictimplemented in it. So you can only invoke the methods by its interface not class type 阅读全文

posted @ 2010-09-12 17:43 Clarence Yang 阅读(290) 评论(0) 推荐(0)