C# 打印(-)减去从右到左的十进制值

C# 打印(-)减去从右到左的十进制值,c#,C#,它返回了123- 但是我想要-123使用stringFormat.Alignment=StringAlignment.Far来右对齐文本,而不是DirectionRightToLeft(这是像希伯来语一样的从右到左的字母表),感谢它的工作。。 decimal abc = -123; StringFormat drawFormat = new StringFormat(); drawFormat.FormatFlags = StringFormatFlags.DirectionRightToLef

它返回了
123-

但是我想要
-123

使用
stringFormat.Alignment=StringAlignment.Far
来右对齐文本,而不是DirectionRightToLeft(这是像希伯来语一样的从右到左的字母表),感谢它的工作。。
decimal abc = -123;
StringFormat drawFormat = new StringFormat();
drawFormat.FormatFlags = StringFormatFlags.DirectionRightToLeft;

graphics.DrawString(abc.ToString(), new Font("Segoe UI", 10, FontStyle.Bold), new SolidBrush(Color.Black), 100, 100, drawFormat);