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

  • Home
  • SEARCH
  • 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 6111589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:38:52+00:00 2026-05-23T14:38:52+00:00

I am working with someone else’s code and trying to make some modifications. So

  • 0

I am working with someone else’s code and trying to make some modifications. So what I’m needing to do is take the following:

RemoteFileDP remoteFile = new DPFactory().CreateRemoteFileDP(configData);

And change it so that remoteFile can equal what is in a string variable. To further explain let me give some more of the code:

ConfigDP configData = new ConfigDP();

So the statement above is executed before the remoteFile statement and ConfigDP is has two classes above it (abstract Config and then its base: abstract ConfigBase). DP is also the child of two abstract classes above it (abstract RemoteFile and abstract RemoteFileBase).

From my understanding remoteFile is the result of data extracted from a database query, stored into a list or a Hashtable (sorry just an intern so I’m working through this).

The reason I need remoteFile to accept a string value is because there are MANY methods that utilize the information in remoteFile and I would like to avoid having to create a WHOLE BUNCH of overloaded methods that accept a string value instead of RemoteFileDP remoteFile.

So if I can take a string value like:

string locationDirectory;

which is passed in from another method and then have something similar to the following:

RemoteFileDP remoteFile = locationDirectory;

then all other methods using remoteFile will not have to be overloaded or changed.

Sorry for all the detail but this is my first time posting so I hope I provided enough information. I did look at C# Convert dynamic string to existing Class and C#: Instantiate an object with a runtime-determined type and wrote the following code:

RemoteFilesDP remoteFile = (RemoteFileDP)Activator.CreateInstance(typeof(RemoteFileDP), locationDirectory);

However I keep getting a “MissingMethodException” error that the constructor for RemoteFileDP is not found but I do have the constructor as seen below:

public RemoteFileDP()
    {
    } //end of RemoteFilePlattsDP constructor

Thank you ahead of time for your assistance!

  • 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-23T14:38:52+00:00Added an answer on May 23, 2026 at 2:38 pm

    You’re missing a constructor that takes a string as a parameter. Try your code with

    public RemoteFileDP(string locationDirectory)
    {
        // do stuff with locationDirectory to initialize RemoteFileDP appropriately
    }
    

    Of course, if you do that, why not just call the constructor directly?

    RemoteFileDP remoteFile = new RemoteFileDP(locationDirectory);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with someone else's code, and I'm adding a new form So, I've
I'm working on a site someone else developed. They used the following jQuery code
I am working on someone else's PHP code and seeing this pattern over and
I've recently been working with someone else's code and I realized that this individual
I'm working with someone else's code, and I want to be able to see
I am working with someone else's code. The code was originally designed so that
I'm working with someone else's code on a device which can put an image
I'm new to Google Apps Engine (working on an existing project for someone else)
Working on someone else's code where they've instituted a SQL Dependency event (SQL 2008).
I'm working on someone else's code and found something very interesting and hoping someone

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.