using System.Xml.Serialization;
public static void Main()
Console.WriteLine("ProfileName: " + args.ProfileName);
Console.WriteLine("Hostname: " + args.Hostname);
Console.WriteLine("Lang: " + args.Lang);
Console.WriteLine("Region: " + args.Region);
var hostname = Encoding.ASCII.GetBytes(args.Hostname);
Array.Resize(ref hostname, 0x14);
public Args(string profileName, string hostname, int lang, byte region)
ProfileName = profileName;
private string _profileName;
private string _hostname;
[XmlAttribute("profileName")]
public string ProfileName
throw new ArgumentNullException();
throw new ArgumentOutOfRangeException();
[XmlAttribute("hostname")]
throw new ArgumentNullException();
if (value.Length < 0x8 || value.Length > 0x14)
throw new ArgumentOutOfRangeException();
_lang = value >= (int)LANG.JAJP && value <= (int)LANG.FRFR ? value : (int)LANG.JAJP;
_region = value >= (byte)1 && value <= (byte)3 ? value : (byte)1;