static bool IsPortablePdb(Stream stream) { const uint ppdb_signature = 0x424a5342; var position = stream.Position; try { var reader = new BinaryReader (stream); return reader.ReadUInt32 () == ppdb_signature; } finally { stream.Position = position; } }