making a method out decimal c# .net core code example Example: convert string to decimal c# DepositAmount = Convert.ToDecimal(u.DepositAmount)