using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json.Linq; namespace tlang { public class TArray : TObject { public override JToken AsToken() { var ls = new JArray(); foreach(var item in Items) { ls.Add(item.AsToken()); } return ls; } public byte[] ToBytes() { byte[] data = new byte[Items.Count]; SetBytes(data,0,data.Length); return data; } public void SetBytes(byte[] data,int offset,int count) { count = Math.Min(data.Length - offset,count); for(int i = 0;i Items.Count > 0; public TArray(int sz=0) { Items =new List(); for(int i = 0;i Items {get;set;} } }