double temp = TickSize - (int)TickSize; // get fractional part of TickSize
string a = temp.ToString(); // make it into a string
if (a.IndexOf(".") > 0) decimals = (a.Length - 2); // get the number of characters in the string minus the leading 0 and the decimal point
if (a.IndexOf("E") > 0) decimals = Convert.ToInt16(a.Substring(3)); // If scientific notation, then extract the number of decimal places, e.g. 1E-06
Bryan

Comment