public static void readLoop(MemoryStream msdata, List <PRoomXlmjData> p) { int Len = proto_util.readShort(msdata); for (int i = 0; i < Len; i++) { PRoomXlmjData _pm = new PRoomXlmjData(); _pm.read(msdata); p.Add(_pm); } }