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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:53:25+00:00 2026-06-10T01:53:25+00:00

So while I was testing a method I made with a DataRow parameter, I

  • 0

So while I was testing a method I made with a DataRow parameter, I sent in an argument and modified it inside the method. After that, my original DataRow changed to whatever it ended up being after the method. I realized this was because DataRow is a “reference type”, which is new to me.

I now know that I can use “ref” or “out” before other data types when using methods so that the same effect as the DataRow example would happen. But my question is, which data types are reference types by default? I don’t want to be caught off guard when I pass another kind of data type into a method and having the original value change.

  • 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-10T01:53:27+00:00Added an answer on June 10, 2026 at 1:53 am

    But my question is, which data types are reference types by default?

    Anything that is defined as a class is a reference type, as well as a variable referencing an interface or delegate, or a variable declared dynamic. See Reference Types for details. You can change members of a class within a method without passing by ref or out. That being said, you can’t change the reference itself – so the variable will always point to the same instance after a method call as before the method call unless you pass it via out or ref.

    If it’s a struct, it will be a value type.

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

Sidebar

Related Questions

I am testing a webservice method which accepts session-id as a parameter. While testing
While writing and testing a python method, I am currently using the following approach:
I noticed while testing Masonry that if I shift-reload in Firefox (to hard reload),
So while testing on my computer it works just fine, but as soon I
This foreach loop works fine while testing and only returning 5 rows of data,
I am getting the NSConcreteData leaked object while testing the leaks in the instruments.It
I ran into this issue while testing a rails app deployed to two different
My time zone is CET (Berlin). And while testing Joda's DateTime i noticed some
I am trying to learn and writting this part of code. while testing few
I am using Windows 2008 r2 64 bit system. While testing our script ,we

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.