Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

EF cannot make up it mind on string formatting

$
0
0

"Charge" is type money

"creditcared" is also the same type

txn.Transaction.creditcard.ToString()  compiler is happy

txn.Transaction.Charge.ToString() compliler complains about "no overload for method ToString() takes one argument"

ok so I can change to:

oldtxn.Transaction.Charge.ToString("C", culture)

Now it complainsabout "no overload for method 'ToString' takes 2 arguments"

Why are these two decimals treated so differently?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>