public static string AlphabeticalMoney(this long value, string postfix = null) { StringBuilder resultBuilder = new StringBuilder(); bool isNegetive = value < 0; if (isNegetive) { value = Math.Abs(value); } value = value.AppendAsTextByCheck(resultBuilder, "{0} میلیارد", Miliard); value = value.AppendAsTextByCheck(resultBuilder, "{0} میلیون", Milion); value = value.AppendAsTextByCheck(resultBuilder, "{0} هزار", Hezar); value = value.AppendAsTextByCheck(resultBuilder, "{0}", 1); if (isNegetive) { resultBuilder.Insert(0, "منفی "); } if (resultBuilder.Length == 0) { resultBuilder.Append("صفر"); } resultBuilder.Append(" "); resultBuilder.Append(postfix ?? "ریال"); return(resultBuilder.ToString()); }