c# - C# - 计算给定数据的二进制偏移量
问题描述
我正在识别 NAND 转储中给定数据的偏移量。我要识别的数据如下 - 'TitleId'。
https://github.com/Thealexbarney/LibHac/blob/master/src/LibHac/IO/Save/Header.cs
public class ExtraData
{
public ulong TitleId { get; }
public Guid UserId { get; }
public ulong SaveId { get; }
public SaveDataType Type { get; }
public ulong SaveOwnerId { get; }
public long Timestamp { get; }
public long Field50 { get; }
public uint Field54 { get; }
public long DataSize { get; }
public long JournalSize { get; }
public ExtraData(BinaryReader reader)
{
TitleId = reader.ReadUInt64();
UserId = ToGuid(reader.ReadBytes(0x10));
SaveId = reader.ReadUInt64();
Type = (SaveDataType)reader.ReadByte();
reader.BaseStream.Position += 0x1f;
SaveOwnerId = reader.ReadUInt64();
Timestamp = reader.ReadInt64();
Field50 = reader.ReadUInt32();
Field54 = reader.ReadUInt32();
DataSize = reader.ReadInt64();
JournalSize = reader.ReadInt64();
}
你知道我怎么能得到那个titleid的偏移量吗?我对 c# 不是特别熟练,我将不胜感激。
解决方案
推荐阅读
- azure - 无法查看 azure 管道
- javascript - 安全登录表单所需的属性是否足够?
- c# - 没有得到正确的球体体积
- reactjs - 您如何使用 jest 和酶测试功能组件中的反应状态?
- django - 放弃处理视频无法处理 - Youtube API?
- javascript - 是否可以在 AngularJS、JavaScript 和 JQuery 中跟踪移动/桌面模型?
- elixir - 在 elixir 项目 (elixirLS.projectDir) 中保存文件时出错
- python - Python:比较来自 csv 的行并将相同的结果组合在一起以进行 pdf 布局比较
- azure - 如何在 azure 函数的 local.settings.json 文件中使用提供程序名称正确写入连接字符串
- kotlin - kotlin 中的国际象棋 BitBoards。哪种数据类型?