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

  • SEARCH
  • Home
  • 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 9006029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:18:19+00:00 2026-06-16T01:18:19+00:00

Suppose I have a custom object with a public sub looking something along these

  • 0

Suppose I have a custom object with a public sub looking something along these lines:

Public Class MyObject
   Public Function ReturnData(StartDate as Date, InputData as List(of string)) As List(Of String)
End Class

And then have another custom object that looks like this:

Public Class HoldingObject
   Public MyDate as Date
   Public MyInfo as String
End Class

Now, in a different class, I have the following:

Dim DataList as List(of HoldingObject)
Dim WorkingClass as New MyObject

Datalist looking as follows:
MyDate:         MyInfo:
1/1/2012        a
1/2/2012        b
1/2/2012        c
1/2/2012        d
1/1/2012        e
1/2/2012        f
1/2/2012        g
1/2/2012        h
1/3/2012        i
1/3/2012        j
1/3/2012        k
1/1/2012        l
1/1/2012        m

What I would like to do, is make up some kind of a Linq statement that would:

  1. Group Datalist list by date (Would be 3 grouped inputs – 1/1/2012; 1/2/2012; 1/3/2012)
  2. Submit each group to WorkingClass.ReturnData as inputs and get the return value

How could I do this via Linq / Lambdas or any other way you see as being best programming practice??

  • 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-16T01:18:20+00:00Added an answer on June 16, 2026 at 1:18 am

    Actually I can’t test it on my own right now, but it should work:

    Dim result = (From i In DataList
                 Group i By date = i.MyDate Into g
                 Select WorkingClass.ReturnData(date, g.Select(Function(gi) gi.MyInfo).ToList())).ToList()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I create a custom object/javascript class (airquotes) as follows: // Constructor function CustomObject(stringParam)
Let's suppose I have this object: [Serializable] public class MyClass { public int Age
Suppose I have a custom object set up in a class similar to this.
Suppose I have a static method of my class that returns an object of
Suppose I have a simple model, such as Record: @Model public class Record {
Suppose I have the following class package { import flash.display.Stage; public class CustomObject {
Suppose i have class Person { public int Id {get;set;} public string Name {get;set;}
The scenario Suppose I have the following two model classes: public class ProductColor {
Suppose I have a model: public class Menu { public string Name { get;
Suppose we have this example: http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html with source code available here: http://code.google.com/p/myandroidwidgets/source/browse/trunk/Phonebook/src/com/abeanie/ How can

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.