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 668421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:02:16+00:00 2026-05-14T00:02:16+00:00

I work with C# 99% of the time. However, I’m having to update some

  • 0

I work with C# 99% of the time. However, I’m having to update some legacy VB.Net code and encountering an issue with VB.Net code syntax. The error that I get is “ByRef” is underlined and “Expected Expression” tag shows up when you hover over “ByRef”.

The “FooDetail.Load” function is written in C# and expects a List object passed as reference. Don’t have any trouble using the same function in other C# classes. Can someone indicate what is wrong with below VB.Net code.

Dim FooDetail As New clsFooDetail()
FooDetail.FooID = FooID
Dim lstFooDetail As New List(Of clsFooDetail)
FooDetail.Load(ConnectionString, "Stored Procedure", ByRef lstFooDetail as System.Collection.List(Of(clsFooDetail))
  • 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-05-14T00:02:16+00:00Added an answer on May 14, 2026 at 12:02 am

    You can’t declare a variable in a method call. Nor do you use the equivalent of “out”. And don’t use “As New” when the method returns a new list. Write it like this:

    Dim lstFooDetail As List(Of clsFooDetail)
    FooDetail.Load(ConnectionString, "Stored Procedure", lstFooDetail)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some code that used strings to represent time such as 0620,
I have my java-written application being killed after some time of work. Java application
I have seen many time that far pointers are used to work for TSR.
I'm having an impossible time getting border-collapse to work for me. The page I'm
I'm posing this question mostly out of curiosity. I've written some code that is
I do some part-time web design work with some other people, and they don't
One of the tabs of my UITabBarController takes some time to work before it
I used a Backgroudworker to do some work in order to do some time
I'm using the following code which appears to work perfectly every time on Vista/Win7.
my main goal is to do some (externally depending time expensive) work for a

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.