Update README.md

This commit is contained in:
Bluzume 2020-08-25 05:59:20 +12:00 committed by GitHub
parent 38aa98cece
commit cad8ae603e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -2,7 +2,16 @@
Super Simple param.sfo parser in C# .NET Framework.
Usage:
Dictionary<string,object> SfoKeys = Sfo.ReadSfo(Stream or Byte\[]);
```
Dictionary<string,object> SfoKeys = Sfo.ReadSfo(File.OpenRead(@"param.sfo"));
```
or
```
Dictionary<string,object> 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"];
```