private string getNameClass(AbstractCollectionMeter ab, string result) { string fullName = ab.GetType().ToString(); string startName = fullName.Substring(fullName.LastIndexOf('.') + 1); string normalName = startName.Substring(0, startName.LastIndexOf('M')); return(normalName + " = " + result); }
public string searching(AbstractCollectionMeter ab, int num) { sWatch.Start(); ab.searching(num); sWatch.Stop(); result = sWatch.Elapsed.ToString(); return(ab.GetType().ToString().LastIndexOf('.') + "\t" + result); }
public string removing(AbstractCollectionMeter ab, int num) { sWatch.Start(); ab.removing(num); sWatch.Stop(); result = sWatch.Elapsed.ToString(); return(getNameClass(ab, result)); }