public static int Parse(NameImage nameImage, string[] strSplit, int strCnt) { nameImage.Name = strSplit[strCnt] == null ? "" : strSplit[strCnt]; strCnt++; nameImage.ImageLocation = strSplit[strCnt] == null ? "" : strSplit[strCnt]; strCnt++; return(strCnt); }
public static NameImage Parse(string str) { int strCnt = 0; NameImage nameImage = null; string[] strSplit = null; strSplit = str.Split(new char[] { ';' }); strCnt = Parse(nameImage, strSplit, strCnt); return(nameImage); }
public int CompareTo(object obj) { if (obj == null) { throw new System.ArgumentException("Other object is null", "obj"); } NameImage imageInfo = obj as NameImage; if (imageInfo == null) { throw new System.ArgumentException("The argument to compare is not a NameImage", "imageInfo"); } return(this.ToString().CompareTo(imageInfo.ToString())); }
public bool ImagesEqual(object obj) { if (obj == null) { throw new System.ArgumentException("Other object is null", "obj"); } NameImage imageInfo = obj as NameImage; if (imageInfo == null) { throw new System.ArgumentException("The argument to compare is not a NameImage", "imageInfo"); } return(this.ImageLocation == imageInfo.ImageLocation); }