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. Web Development
  3. ASP.NET
  4. Count function

Count function

Scheduled Pinned Locked Moved ASP.NET
csharphelptoolsquestion
2 Posts 2 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.
  • Y Offline
    Y Offline
    yogesh_kumar_agarwal
    wrote on last edited by
    #1

    Dear All, This is a c# code working fine in, Where files is a genric collection. files.Count(f => f.Status == FileUploadStatus.Uploading || f.Status == FileUploadStatus.Resizing) i convert the same in vb.net using some convertion tools, and i got files.Count(Function(f) f.Status = FileUploadStatus.Uploading OrElse f.Status = FileUploadStatus.Resizing) and its not working, got the error like ReadOnly Property Count() As Integer' has no parameters and its return type cannot be indexed. So plz help and let me know what is wrong i m doing here with possible solution. Thanks

    E 1 Reply Last reply
    0
    • Y yogesh_kumar_agarwal

      Dear All, This is a c# code working fine in, Where files is a genric collection. files.Count(f => f.Status == FileUploadStatus.Uploading || f.Status == FileUploadStatus.Resizing) i convert the same in vb.net using some convertion tools, and i got files.Count(Function(f) f.Status = FileUploadStatus.Uploading OrElse f.Status = FileUploadStatus.Resizing) and its not working, got the error like ReadOnly Property Count() As Integer' has no parameters and its return type cannot be indexed. So plz help and let me know what is wrong i m doing here with possible solution. Thanks

      E Offline
      E Offline
      Estys
      wrote on last edited by
      #2

      As far as I know, you can't use anonymous delegates in VB.NET, you have to create a named function. http://visualbasic.about.com/od/usingvbnet/a/lambdaexpr.htm[^] I hope this solves your problem. Cheers

      I don't like my signature at all

      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