#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    6
    Rep Power
    0

    Litlle help please


    our Dr was teaching us about LINQ and generic collections he wrote an object oriented class named employee that contains three datamembers(firstName, lastName, and salary) after that we wrote the main program which contains an array of type employee then we filter a range of salaries by using AndAlso in a LINQ Query


    'filter a range of salaries using AndAlso in a LINQ query
    Dim between4k6k = From e In Employees Where e.monthSalary >= 4000D AndAlso e.monthSalary <= 6000D Select e

    'display employees making between 4000 and 6000 month
    Dispplay(between4k6k, String.Format("Employees earnings in the range {0:C} - {1:C} per month", 4000, 6000))



    my question is what is the meaning of {0:c} - {1:c} (C means currency)
  2. #2
  3. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    Yes, C means currency and {0:C} represents the first argument formatted as currency -> the value 4000. So {1:C} refers to the second argument (6000).

    A quick search finds this link. It's a little out-of-date but still valid I believe.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    6
    Rep Power
    0

    Smile thanks


    thanks a lot that really helped me

IMN logo majestic logo threadwatch logo seochat tools logo