C# decimal separator?

后端 未结 4 2046
孤独总比滥情好
孤独总比滥情好 2020-12-10 03:20

I have a method which returns numbers like this:

public decimal GetNumber()
{
    return 250.00m;
}

Now when this value is printed to the c

4条回答
  •  孤街浪徒
    2020-12-10 03:27

    I have checked it with visual studio 2008 (console application) and its not showing "," instead of "." , please provide more details. I think its issue of culture-info. please provide some more code details

    class Program
    {
        static void Main(string[] args)
        {
            Console.Write(GetNumber());
        }
        public static  decimal GetNumber()
        {
            return 250.00m;
        }
    
    }
    

提交回复
热议问题