public void SetString(string str) { if (ClassName != "string") { return; } Uarray arr = (Uarray)Members[0]; byte[] bytes = UTF8Encoding.UTF8.GetBytes(str); UType[] Chars; if (arr.Value == null || bytes.Length != arr.Value.Length) { Chars = new UType[bytes.Length]; if (arr.Value != null) { for (int i = 0; i < Math.Min(bytes.Length, arr.Value.Length); i++) { Chars[i] = arr.Value[i]; } } arr.Value = Chars; } else { Chars = arr.Value; } for (int i = 0; i < bytes.Length; i++) { if (Chars[i] == null) { Chars[i] = new Uchar(); } ((Uchar)Chars[i]).Value = bytes[i]; } }
public Uchar(Uchar c) { Name = c.Name; }
public Uchar(Uchar c) { Name = c.Name; NeedsAlignment = c.NeedsAlignment; }