悬赏园豆:20
[已关闭问题]
<P>用CLR写个聚集函数,代码如下.</P>
<P>执行结束都提示啥溢出的.</P>
<P>我检查了序列化代码 没有啥溢出的问题.请哪个牛人告诉我怎么回事.</P>
<P> A first chance exception of type 'System.OverflowException' occurred in System.Data.dll</P>
<DIV class=cnblogs_code><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System.Data;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System.Data.SqlClient;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System.Data.SqlTypes;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> Microsoft.SqlServer.Server;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System.Collections.Generic;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>[Serializable]<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>[Microsoft.SqlServer.Server.SqlUserDefinedAggregate<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top> (Format.UserDefined, </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">use custom serialization to serialize the intermediate result</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"> IsInvariantToNulls </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">optimizer property</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"> IsInvariantToDuplicates </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">optimizer property</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"> IsInvariantToOrder </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">optimizer property</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"> MaxByteSize </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">8000</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">maximum size in bytes of persisted value</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">]<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">struct</SPAN><SPAN style="COLOR: #000000"> AVG2 : IBinarySerialize <BR><IMG id=Codehighlighter1_583_1527_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_583_1527_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_583_1527_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_583_1527_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_583_1527_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_583_1527_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_583_1527_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_583_1527_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_583_1527_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_583_1527_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Init()<BR><IMG id=Codehighlighter1_606_674_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_606_674_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_606_674_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_606_674_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_606_674_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_606_674_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_606_674_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_606_674_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_606_674_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_606_674_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Put your code here</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000"> re </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> List</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">();<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> count </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Accumulate(SqlDouble Value)<BR><IMG id=Codehighlighter1_718_811_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_718_811_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_718_811_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_718_811_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_718_811_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_718_811_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_718_811_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_718_811_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_718_811_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_718_811_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Put your code here</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">Value.IsNull)<BR><IMG id=Codehighlighter1_767_808_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_767_808_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_767_808_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_767_808_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_767_808_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_767_808_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_767_808_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_767_808_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_767_808_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_767_808_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> re.Add(Value.Value);<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> count</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Merge(AVG2 Group)<BR><IMG id=Codehighlighter1_845_914_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_845_914_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_845_914_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_845_914_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_845_914_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_845_914_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_845_914_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_845_914_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_845_914_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_845_914_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Put your code here</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000"> re </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> Group.re;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> count </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> Group.count;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> SqlDouble Terminate()<BR><IMG id=Codehighlighter1_947_1048_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_947_1048_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_947_1048_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_947_1048_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_947_1048_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_947_1048_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_947_1048_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_947_1048_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_947_1048_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_947_1048_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000"> sum </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">foreach</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000"> item </SPAN><SPAN style="COLOR: #0000ff">in</SPAN><SPAN style="COLOR: #000000"> re)<BR><IMG id=Codehighlighter1_999_1020_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_999_1020_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_999_1020_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_999_1020_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_999_1020_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_999_1020_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_999_1020_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_999_1020_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_999_1020_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_999_1020_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> sum </SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000"> item;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> sum </SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000"> re.Count;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> This is a place-holder member field</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> count;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> List</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> re;<BR><IMG id=Codehighlighter1_1138_1525_Closed_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1138_1525_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1138_1525_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1138_1525_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top><IMG id=Codehighlighter1_1138_1525_Open_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1138_1525_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1138_1525_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1138_1525_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top> </SPAN><SPAN id=Codehighlighter1_1138_1525_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">IBinarySerialize Members</SPAN><SPAN id=Codehighlighter1_1138_1525_Open_Text style="DISPLAY: none"><SPAN style="COLOR: #0000ff">#region</SPAN><SPAN style="COLOR: #000000"> IBinarySerialize Members</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Read(System.IO.BinaryReader r)<BR><IMG id=Codehighlighter1_1217_1381_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1217_1381_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1217_1381_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1217_1381_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1217_1381_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1217_1381_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1217_1381_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1217_1381_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_1217_1381_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1217_1381_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> re </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> List</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">();<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> re.Clear();<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> count </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> r.ReadInt32();<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> count; i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1326_1375_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1326_1375_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1326_1375_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1326_1375_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1326_1375_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1326_1375_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1326_1375_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1326_1375_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_1326_1375_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1326_1375_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000"> b </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> r.ReadDouble();<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> re.Add(b);<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> <BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Write(System.IO.BinaryWriter w)<BR><IMG id=Codehighlighter1_1429_1512_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1429_1512_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1429_1512_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1429_1512_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1429_1512_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1429_1512_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1429_1512_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1429_1512_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_1429_1512_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1429_1512_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> w.Write(count);<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> count; i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1485_1509_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1485_1509_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1485_1509_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1485_1509_Closed_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1485_1509_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1485_1509_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1485_1509_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1485_1509_Open_Text').style.display='inline';" src="http://space.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </SPAN><SPAN id=Codehighlighter1_1485_1509_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://space.cnblogs.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1485_1509_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top> w.Write(re[i]);<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></SPAN></DIV>