From cad8ae603ee31a41761f09c1b2488eed5c392b0d Mon Sep 17 00:00:00 2001 From: Bluzume <39113159+KuromeSan@users.noreply.github.com> Date: Tue, 25 Aug 2020 05:59:20 +1200 Subject: [PATCH] Update README.md --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1823189..043e13c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,16 @@ Super Simple param.sfo parser in C# .NET Framework. Usage: - Dictionary SfoKeys = Sfo.ReadSfo(Stream or Byte\[]); +``` + Dictionary SfoKeys = Sfo.ReadSfo(File.OpenRead(@"param.sfo")); +``` +or +``` + Dictionary SfoKeys = Sfo.ReadSfo(File.ReadAlLBytes(@"param.sfo")); +``` +Reading values: +``` UInt32 AttributeMinor = (UInt32)SfoKeys\["ATTRIBUTE_MINOR"]; - Byte\[] AccountId = (Byte\[])SfoKeys\["ACCOUNT_ID"]; - String TitleId = (string)SfoKeys\["TITLE_ID"]; + Byte[] AccountId = (Byte[])SfoKeys["ACCOUNT_ID"]; + String TitleId = (string)SfoKeys["TITLE_ID"]; +```