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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:56:12+00:00 2026-05-13T18:56:12+00:00

I’m looking for some ideas on how to do this in the most efficient

  • 0

I’m looking for some ideas on how to do this in the most efficient way.

I am replacing an old COM library that is used in a large legacy ASP website with a .NET library written in C#. The old library consisted of just two classes. I’ve rewritten this functionality in just one class in the new library.

The old code makes multiple references to both classes in several dozen pages. I’ve been getting around the name issue by exposing some empty classes that derive from my single master class which performs the functionality of both previous classes and all is well:

public class Foo1 : Bar {}
public class Foo2 : Bar {}

Bar being the master class which performs all functionality and the two empty classes being the names used within the ASP pages that reference this functionality. Declaring these empty classes seems inefficient but it works fine and alleviates the need to touch the existing legacy ASP code.

I’d ideally like to do something like this in my library:

public using Foo1 = Bar;
public using Foo2 = Bar;

Obviously this doesn’t work but I feel it best describes what I’d like to do. I would like my class to have two public aliases that can be referenced outside it’s namespace.

I’ve been doing quite a bit of digging and I have not been able to find a method that will allow me to do this.

I’ve got a couple different solutions however.

  1. Rename all existing class references in the ASP code to be consistent with my new class.
  2. Use some empty public class declarations that derive from my new all inclusive class.

Are there any other methods which would be more efficient?

  • 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-13T18:56:12+00:00Added an answer on May 13, 2026 at 6:56 pm

    I guess inheriting from your master class is the better approach. This will allow you not to go through all the references and risking making some mistakes here and there, and ensures your changes are transparent for your application. I think this is efficient enough! =)

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

Sidebar

Related Questions

I'm looking for suggestions for debugging... If you view this site in Firefox or
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to count how many characters a certain string has in PHP, but

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.