Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8833081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:41:36+00:00 2026-06-14T08:41:36+00:00

I’ve tried every translation service under the sun to get this syntax right but

  • 0

I’ve tried every translation service under the sun to get this syntax right but I still get “Overload resolution failed because no accessible ‘SelectMany’ can be called with these arguments”
on the first part of the select statement (up to the full stop just before the groupby keyword)

the original c# statement from an online example I’m trying to get working locally:

public IEnumerable<TagGroup> GetTagGroups()
{

    var tagGroups = 
        // extract the delimited tags string and session id from all sessions
        DbSet.Select(s => new { s.Tags, s.Id })
            .ToArray() // we'll process them in memory.

            // split the "Tags" string into individual tags 
            // and flatten into {tag, id} pairs
            .SelectMany(
                s =>
                s.Tags.Split(_tagDelimiter, StringSplitOptions.RemoveEmptyEntries)
                    .Select(t => new { Tag = t, s.Id })
            )

            // group {tag, id} by tag into unique {tag, [session-id-array]}
            .GroupBy(g => g.Tag, data => data.Id)

            // project the group into TagGroup instances
            // ensuring that ids array in each array are unique
            .Select(tg => new TagGroup 
                            {
                                Tag = tg.Key, 
                                Ids = tg.Distinct().ToArray(),
                            })
            .OrderBy(tg => tg.Tag);

    return tagGroups;
}

The closest I’ve come to it in VB:

Public Function GetTagGroups() As IEnumerable(Of TagGroup)

    ' extract the delimited tags string and session id from all sessions
    ' we'll process them in memory.
    ' split the "Tags" string into individual tags 
    ' and flatten into {tag, id} pairs

    ' group {tag, id} by tag into unique {tag, [session-id-array]}

    ' project the group into TagGroup instances
    ' ensuring that ids array in each array are unique

    Dim tagGroups = DbSet.[Select](Function(s) New With { _
        s.Tags, _
        s.Id _
    }).ToArray().SelectMany(Function(s) s.Tags.Split(_tagDelimiter, StringSplitOptions.RemoveEmptyEntries).[Select](Function(t) New With { _
        Key .Tag = t, _
        s.Id _
    })).GroupBy(Function(g) g.Tag, Function(data) data.Id).[Select](Function(tg) New With { _
        Key .Tag = tg.Key, _
        Key .Ids = tg.Distinct().ToArray() _
    }).OrderBy(Function(tg) tg.Tag)

    Return tagGroups
End Function

This results in the visual studio 2012 intellisense underlining in blue the first part of the statement from “DbSet” on the first line through to the last parenthesis before the “.GroupBy” near the bottom. The error is “Overload resolution failed because no accessible ‘SelectMany’ can be called with these arguments”.

As it’s a code example I’m trying to convert to vb to run locally and understand and I’m not experienced enough with linq I’m completely at a loss of how to try and deal with this. It’s way beyond my current understanding so could be a simple syntax error or a complete hash from start to finish for all I know!

Would be very grateful for any pointers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:41:38+00:00Added an answer on June 14, 2026 at 8:41 am

    I have now put this in VS2k8, and as well as the two simple issues with the VB sample I previously noted:

    • The first two New With constructs must specify .<field> = AFAIK, and
    • the last New With should not be anonymous.

    I now also note these are the declarations I needed to get the code to not have errors. Other than adding intermediate query variables (which BTW mean you could thread the C# comments back in), I don’t recall actually changing the code further. Note the _tagDelimiter as a Char() — what did the C# code declare it as? (Looking at the String.Split overloads that mention StringSplitOptions it has to be Char() or String() or C# is implicitly changing types somewhere that VB.NET doesn’t.)

    Class TagList
        Public Tags As String
        Public Id As String
    End Class
    
    Private DbSet As IQueryable(Of TagList)
    
    Class TagGroup
        Public Tag As String
        Public Ids() As String
    End Class
    
    Private _tagDelimiter As Char()
    
    Public Function GetTagGroups() As IEnumerable(Of TagGroup)
    
        Dim theTags = DbSet.[Select](Function(s) New With { _
            .Tags = s.Tags, _
            .Id = s.Id _
        }).ToArray()
    
        Dim many = theTags.SelectMany(Function(s) s.Tags.Split(_tagDelimiter, StringSplitOptions.RemoveEmptyEntries).[Select](Function(t) New With { _
            Key .Tag = t, _
            .Id = s.Id _
        }))
    
        Dim grouped = many.GroupBy(Function(g) g.Tag, Function(data) data.Id)
    
        Dim unordered = grouped.[Select](Function(tg) New TagGroup With { _
            .Tag = tg.Key, _
            .Ids = tg.Distinct().ToArray() _
        })
        Dim tagGroups = unordered.OrderBy(Function(tg) tg.Tag)
    
        Return tagGroups
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.