コード例 #1
0
      private void SaveWordItem(BinaryWriter writer, WordItem item)
      {
         int frequency = item.nFrequency;
         int wordLength = item.nWordLen;
         int handle = item.nPOS;

         writer.Write(frequency);
         writer.Write(wordLength);
         writer.Write(handle);

         if (wordLength > 0)
            writer.Write(Encoding.GetEncoding("gb2312").GetBytes(item.sWord));
      }