FlickrNet.Utils.WriteString C# (CSharp) Method

WriteString() static private method

static private WriteString ( Stream s, string str ) : void
s Stream
str string
return void
        internal static void WriteString(Stream s, string str)
        {
            WriteInt32(s, str.Length);
            foreach (char c in str)
            {
                s.WriteByte((byte) (c & 0xFF));
                s.WriteByte((byte) ((c >> 8) & 0xFF));
            }
        }

Usage Example

 private void Store(Stream s, Hashtable table)
 {
     Utils.WriteInt32(s, table.Count);
     foreach (DictionaryEntry entry in table)
     {
         Utils.WriteString(s, (string)entry.Key);
         persister.Write(s, (ICacheItem)entry.Value);
     }
 }
All Usage Examples Of FlickrNet.Utils::WriteString