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

Problem with LINQ / Double type

$
0
0
var mySum = (from q in db.QUOTEs
                     where q.STATUS.Equals("P")
                     select  q.FEE ).Sum();

        foreach (var i in mySum)
        {
            LabelTotalFee.Text = String.Format("{0:C}", i.FEE);
        }

THE ERROR:

"foreach statement cannot operate on variables of the type DOUBLE, because double does not contain a Public definition for GetEnumerator"

Any ideas on how to solve this?

thanks in advance


Viewing all articles
Browse latest Browse all 1698

Trending Articles



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