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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:00:58+00:00 2026-05-23T04:00:58+00:00

I used a converter program to convert this vb to C# Public Overloads Shared

  • 0

I used a converter program to convert this vb to C#

Public Overloads Shared Function ExecuteReader(ByVal statement As String, ByVal commandType As CommandType, _
    ByVal paramCollection As ArrayList, ByVal connectionDelegate As OpenDatabaseConnection, _
    ByVal outputConnectionObject As IDbConnection, ByVal CommandTimeout As Int16) As InstantASP.Common.Data.IDataReader

Return PrivateExecuteReader(Configuration.AppSettings.DataProvider, _
    statement, commandType, paramCollection, connectionDelegate, outputConnectionObject, CommandTimeout)

End Function

I’m not familiar with VB.NET and I don’t know why this converter converted it to C# with all these refs. I don’t even use ref much if at all and don’t think this is the best/cleanest way to convert this. But I’m having trouble understanding all this including the conversion and if this makes any sense whatsoever after the conversion.

public static IDataReader ExecuteReader(string statement, CommandType commandType, ArrayList paramCollection, OpenDatabaseConnection connectionDelegate, IDbConnection outputConnectionObject, Int16 commandTimeout)
{
    return PrivateExecuteReader(ref AppSettings.DataProvider(), ref statement,
        ref commandType, ref paramCollection, ref connectionDelegate,
        ref outputConnectionObject, ref commandTimeout);
}
  • 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-23T04:00:58+00:00Added an answer on May 23, 2026 at 4:00 am

    It put the ref on those parameters because PrivateExecuteReader() declares them as ref (C#) or ByRef (VB.NET). There isn’t a choice.

    In VB.NET, you just pass in your arguments and have to look at the method’s declaration (or Intellisense hints) to know whether it’s by reference or by value. But in C#, if a method declares a parameter as ref, then you also have to mark the argument you’re passing as ref so that it is explicit that you understand that it is being passed by reference.

    Looks like a [mostly] correct conversion to me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's this program, pdftotext, that can convert a pdf file to a text file.
Can anyone recommend a good application that could be used to convert VB.NET projects
How come when I use the following method, to be used to convert all
I've used the 'hg convert' command to try to move my SVN repository to
I am asking about the best tool that you used before to convert a
I've used XSD.EXE to convert an XSD into an object. That works fine and
I have used many of the Convert.To..... functions for conversion , but I didn't
I'm trying to convert an XML file into the markup used by dokuwiki, using
How to convert percent value to decimal value in PHP to be used in
How do I convert an array to a list in Java? I used the

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.