静的 バイト [] GetBytesFromDic(辞書< 文字列、文字列 > DIC) { もし(DIC == nullの ||!dic.Any()) { リターン ヌル。 } 使用して(MemoryStreamをミリ秒= 新しいのMemoryStream()) { BinaryFormatter binFormatter = 新にBinaryFormatter(); binFormatter.Serialize(MS、DIC)。 バイト [] dicBytes = ms.ToArray()。 リターンdicBytes。 } }