本文整理汇总了C#中ByteArray.ReadUTF方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArray.ReadUTF方法的具体用法?C# ByteArray.ReadUTF怎么用?C# ByteArray.ReadUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ByteArray
的用法示例。
在下文中一共展示了ByteArray.ReadUTF方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateByteArray
public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
{
ByteArray data = new ByteArray(bytes);
System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
int length = data.ReadInt();
for (int i = 0; (i < length); i = (i + 1))
{
BuildingTemplateVO vo = new BuildingTemplateVO();
vo.id = data.ReadInt();
vo.name = data.ReadUTF();
vo.type = data.ReadInt();
vo.buildingIndex = data.ReadInt();
vo.camp = data.ReadInt();
vo.image = data.ReadUTF();
vo.levelMap = data.ReadInt();
vo.affiliation = data.ReadInt();
vo.openNeedThLevel = data.ReadInt();
vo.isInitZore = data.ReadInt();
vo.levelRule = data.ReadInt();
vo.gold = data.ReadInt();
vo.wood = data.ReadInt();
vo.crystal = data.ReadInt();
vo.stone = data.ReadInt();
vo.sulfur = data.ReadInt();
vo.diamond = data.ReadInt();
vo.upgradeCdTime = data.ReadInt();
vo.productActorId = data.ReadInt();
vo.makeCurrencyId = data.ReadInt();
vo.desc = data.ReadUTF();
vo.isOpen = data.ReadInt();
list.Add(vo);
}
return list;
}
示例2: GenerateByteArray
public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
{
ByteArray data = new ByteArray(bytes);
System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
int length = data.ReadInt();
for (int i = 0; (i < length); i = (i + 1))
{
LanguageVO vo = new LanguageVO();
vo.Value = data.ReadUTF();
vo.key = data.ReadUTF();
list.Add(vo);
}
return list;
}