toDecimal

private decimal? ToDecimal(Object obj)
		{
			decimal result = 0;
			if (obj == null) return null;

			if (decimal.TryParse(obj.ToString(), out result))
				return result;
			return null;
		}
Example:
ToDecimal(row["col"]

Description

Object to decimal?

Details

Double click on the code to select all.

 

;