public void toValue(string time) { IList <string> list = StringExec.RegexSplit(time, toValueFormat); this.Hour = int.Parse(list[0]); this.Minute = int.Parse(list[1]); }
public void toValue(string address) { IList <string> list = StringExec.RegexSplit(address, "[\\,]?[\\s]+"); this.Num = list[0]; this.Street = list[1]; this.District = list[2]; this.City = list[3]; if (list.Count == 5) { this.State = null; this.Country = list[4]; } else { this.State = list[4]; this.Country = list[5]; } }