如何在c#方法中将decimal作为参数发送
我有一个简单的类,它的构造函数是这样的:如何在c#方法中将decimal作为参数发送,c#,arguments,C#,Arguments,我有一个简单的类,它的构造函数是这样的: public Components(int sNo, string componentName, string fileType, **decimal size**, int totalDownloads, string filePath, **decimal price**, string description) 我试图通过调用以下语句来发送参数: new DatabaseObjects.Components(1, "CC Cleaner", "e
public Components(int sNo, string componentName, string fileType, **decimal size**, int totalDownloads, string filePath, **decimal price**, string description)
我试图通过调用以下语句来发送参数:
new DatabaseObjects.Components(1, "CC Cleaner", "exe", **2,84**, 0, @"C:\Users\admin\Desktop\Software_Components\CCCleaner.exe", **5,00**, "To clean up junk files and invalid Registry entries")
但是你可以看到,当我尝试以这种方式发送参数时,它不是把2,84作为一个值,而是把2作为一个参数,把84作为一个参数
当我试图替换时,用。我的意思是2,84等于2.84
这是说不能将双精度转换为十进制
我怎样才能解决这个问题
请帮助我使用2.84m密码
普通2.84
解析为,不能隐式转换为decimal