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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:49:47+00:00 2026-05-19T21:49:47+00:00

I have done some research on this question before deciding to ask it. I

  • 0

I have done some research on this question before deciding to ask it. I just could not find anything that helped me.

I am writing an application in C# for the compact framework 2.0.

I need to take a data object instantiated on form1 and pass that object a form2. Work on the data object in form2 and then pass that data back to form1 so it can be saved.

I understand that a form is just an object an I also understand that objects are past by reference and not by value. I also understand the difference between the two types. I just cannot make it work for some reason.

What is the best, and cleanest, way in code to achieve this?

  • 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-19T21:49:48+00:00Added an answer on May 19, 2026 at 9:49 pm

    What you need to do is create a second constructor to your second form that accepts an object as a parameter… for all I care, it could be the entire Form1 object instance, then you can get whatever you want from it. Preserve this object in your second form and modify it as needed there. Upon completion of your second form, your first form will have that data and you can do whatever “refreshing” once the second form closes.

    public partial class YourSecondForm : Form
    {
        object PreserveFromFirstForm;
    
        public YourSecondForm()
        {
           ... its default Constructor...
        }
    
        public YourSecondForm( object ParmFromFirstForm ) : this()
        {
           this.PreserveFromFirstForm = ParmFromFirstForm;
        } 
    
        private void YourSecondFormMethodToManipulate()
        {
           // you would obviously have to type-cast the object as needed
           // but could manipulate whatever you needed for the duration of the second form.
           this.PreserveFromFirstForm.Whatever = "something";
        }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done some research on this subject, and found out, that Gzipping and
I've asked a similar question before, but I've done some more research and this
I have done some research on this question and most answers are a few
I've done some Python but have just now starting to use Ruby I could
I have done some research, and majority of the examples I have found use
I've done some research into server push with javascript and have found the general
I have done some work with Ruby on Rails but am still not comfortable
This is uni assignment and I have already done some stuff. Please go to
I've done some simple string -> DateTime conversions before using DateTime.ParseExact(), but I have
I know this can be done and i have seen it done using some

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.