Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DataTable Compute Method

DataTable Compute Method

Scheduled Pinned Locked Moved C#
phpcom
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elizas
    wrote on last edited by
    #1

    Compute is one of the methods of DataTable class. This method computes an expression on the current rows that pass the filter criteria. Syntax Object DataTable.Compute(string expression , string filter) Expression - The expression to compute. Filter - The filter to limit the rows that evaluate in the expression. This method's return type is System.Object. So, you have to cast it with appropriate data type. The following operations can be passed through as expression parameter. Sum -> Sum Average -> Avg Minimum -> Min Maximum -> Max Count -> Count Statistical standard deviation ->StDev Statistical variance -> Var http://www.mindfiresolutions.com/DataTable-Compute-Method-628.php[^]

    Cheers, Eliza

    N 1 Reply Last reply
    0
    • E elizas

      Compute is one of the methods of DataTable class. This method computes an expression on the current rows that pass the filter criteria. Syntax Object DataTable.Compute(string expression , string filter) Expression - The expression to compute. Filter - The filter to limit the rows that evaluate in the expression. This method's return type is System.Object. So, you have to cast it with appropriate data type. The following operations can be passed through as expression parameter. Sum -> Sum Average -> Avg Minimum -> Min Maximum -> Max Count -> Count Statistical standard deviation ->StDev Statistical variance -> Var http://www.mindfiresolutions.com/DataTable-Compute-Method-628.php[^]

      Cheers, Eliza

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Congratulation, you are one of the few who have read the documentation. Now, do you have an actual question?


      I know the language. I've read a book. - _Madmatt

      OriginalGriffO 1 Reply Last reply
      0
      • N Not Active

        Congratulation, you are one of the few who have read the documentation. Now, do you have an actual question?


        I know the language. I've read a book. - _Madmatt

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        Hey - don't knock it. It's the first time I can remember that someone's actually posted the answer to their homework instead of the question... :laugh:

        You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        L 1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          Hey - don't knock it. It's the first time I can remember that someone's actually posted the answer to their homework instead of the question... :laugh:

          You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          We don't do homework. Guessing what the question of the homework is, we don't do either. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
          All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups