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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:16:32+00:00 2026-05-18T23:16:32+00:00

I use a third party control which exports some data to different formats. The

  • 0

I use a third party control which exports some data to different formats. The control has a property ExportSettings. But it is read-only.

I’ve to manually set its properties like

ctrl.ExportSettings.Paging = false;
ctr.ExportSettings.Background = Color.Red;

So I get the ExportSettings object from the user and I want to set it to the control.

How can I copy all its member values to the user control?

  • 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-18T23:16:32+00:00Added an answer on May 18, 2026 at 11:16 pm

    Try reflection-based cloning:

    private object CloneObject(object o)
    {
        Type t = o.GetType();
        PropertyInfo[] properties = t.GetProperties();
    
        Object p = t.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, 
            null, o, null);
    
        foreach (PropertyInfo pi in properties)
        {
            if (pi.CanWrite)
            {
                pi.SetValue(p, pi.GetValue(o, null), null);
            }
        }
    
        return p;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which approach is better: 1) to use a third-party ORM system or 2) manually
While developing a C++ application, I had to use a third-party library which produced
Possible Duplicate: Storing third-party libraries in source control I'm currently starting a project which
I am writing an app that needs to use a third party ocx control.
I'm using some third-party controls that use an older version of the ASP.NET Ajax
In my project I need to use third party code, stored in several Git
I have a (dump) question regarding VB/C# I often use third party classes where
I have to use a third-party component without source code. I have the release
I need to use a third party .jar lib in my application: unfortunately the
We extensively use a third party app that we'll call thirdparty.com. thirdparty.com and mysite.com

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.