lalitk3
(Lalitk3)
March 1, 2022, 3:57pm
1
I am learning REFramework and getting this error [Queue Item Content: Can not assign 'Convert.ToDecimal].
I am trying to assign decimal type variable Convert.ToDecimal(in_TransactionItem.SpecificContent[“Cashin”].ToString()), but getting below error.
Che
(Che)
March 1, 2022, 4:45pm
2
Hi @lalitk3
Your syntax is wrong. It should be brackets()
, not parentheses []
.
i.e. Convert.ToDecimal(in_TransactionItem.SpecificContent("Cashin").ToString)
Kind Regards
lalitk3
(Lalitk3)
March 1, 2022, 5:00pm
3
Visit Topic
I put Convert.ToDecimal(in_TransactionItem.SpecificContent(“Cashin”).ToString) but now red symbol appear with error message: non invokable number queueitem.specific content cannot be used like a method.
My project is setup as C#, window legacy
Che
(Che)
March 1, 2022, 5:30pm
4
Sorry, I assumed you were using VB.
To aid in debugging, use the immediate window to print the value. Type in in_TransactionItem.SpecificContent["Cashin"].ToString()
Additionally, see if you can get further error information by pressing continue.
lalitk3
(Lalitk3)
March 1, 2022, 5:53pm
5
The value coming is 8 when I put in_TransactionItem.SpecificContent[“Cashin”].ToString() to messagebox. And further error is in below image
Che
(Che)
March 1, 2022, 9:21pm
6
Hmm, i’m not sure what the problem is, have you tried casting it instead?
(decimal)variable