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

The Archive Base Latest Questions

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

Possible Duplicate: References in VB.Net I want to pass a medium large Customer db

  • 0

Possible Duplicate:
References in VB.Net

I want to pass a medium large Customer db object, but I don’t want to pass it by value, because I think it would be unnecessary.

In c++ when you had a large object it was inefficient to pass it by value, because a copy was created from it, so you passed it by reference so that there was no copy (of the object passed) created. I used to pass the parameter as a constant because that way if I tried to change the object inside the function the compiler wouldn’t let me so that I wouldn’t harm the passed object (because it was passed by reference). Is it possible to mimick this in vb.net or is it not needed?

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

    My strong suspicion is that you’re getting confused about how values are passed in VB.

    If your CustomerDb type is a class, then every expression of that type will have a value which is already a reference. By default, that reference will be passed by value – but it’s still only the reference which is passed, not a whole object.

    If your CustomerDb type is a structure, then you really will be passing the whole value each time – and you should strongly consider changing it to a class anyway…

    Of course, when you pass a reference by value, that doesn’t stop the object from being modified within the method, but it does mean that changes to the parameter variable itself aren’t reflected in the calling code.

    Read my article on C# parameter passing – it’s much the same in VB.

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

Sidebar

Related Questions

Possible Duplicate: Self-references in object literal declarations var obj = { value: 10, value2:
Possible Duplicate: Self-references in object literal declarations Is there any way access the value
Possible Duplicate: Self-references in object literal declarations How do I do the following: var
Possible Duplicate: Track all object references in C# Strings are reference types . They
Possible Duplicate: Self-references in object literal declarations Hey Guys, i have a small question
Possible Duplicate: Scala: forward references - why does this code compile? object Omg {
Possible Duplicate: What is a NullReferenceException in .NET? Object reference not set to an
Possible Duplicate: Self-references in object literal declarations Can you call data from it's own
Possible Duplicate: Self-references in object literal declarations Given this object: var OBJ = (function(){
Possible Duplicate: Self-references in object literal declarations Within a .js file I have an

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.