本文整理汇总了C#中Index.ToArray方法的典型用法代码示例。如果您正苦于以下问题:C# Index.ToArray方法的具体用法?C# Index.ToArray怎么用?C# Index.ToArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Index
的用法示例。
在下文中一共展示了Index.ToArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteTo
public void WriteTo(Stream stream, ref Header header, int globalstagindex, int scenariotagindex)
{
stream.Position = header.IndexAddress = Offset;
BinaryWriter bw = new BinaryWriter(stream);
Index index = new Index();
index.TagTypeArrayVirtualAddress =Index.VirtualOffset + 32;
index.TagInfoArrayVirtualAddress = Index.VirtualOffset + 32 + (index.TagTypeCount * 12);
index.GlobalsTagId = globalstagindex;
index.ScenarioTagId = scenariotagindex;
index.TagEntries = new Index.TagInformation[Entries.Count];
index.TagInfoCount = Entries.Count;
for (int i = 0; i < index.TagEntries.Length; i++)
{
index.TagEntries[i] = new Index.TagInformation()
{
Type = Entries[i].Type,
Index = Entries[i].Index,
VirtualAddress = Entries[i].Address,
Length = Entries[i].Length
};
}
bw.Write(index.ToArray());
header.IndexLength = Length;
}