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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:10:18+00:00 2026-06-05T04:10:18+00:00

I have 2 web refs which I can’t change: They are almost identical but

  • 0

I have 2 web refs which I can’t change:

They are almost identical but when referenced one only accepts ProperCase and the other Uppercamelcase.

Example

Not only props is the thing but entire classes with its props and methods

@EDIT: Sorry, I’ve realized it’s more complicated than initially stated:

Not only props is the thing but entire classes with its props and methods and inner classes. Although only used as structures, inner classes have the same issue.

public class Foobar
{
     public string Logmsgno;
     public string Revno;
     public string Reqsox;
     public void Dosomething();
     public Barbaz Mybarbaz;
     public List<quux> Myquuxlist;
}

And the other has names like

public class FooBar
{
     public string LogMsgNo;
     public string RevNo;
     public string ReqSox;
     public void DoSomething();
     public BarBaz MyBarBaz;
     public List<Quux> MyQuuxList;
}

Is there an easy way to make an interface for both?

TIA!

  • 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-05T04:10:20+00:00Added an answer on June 5, 2026 at 4:10 am

    Without a proper re-factoring to update everything and changing names, yes, you COULD with a little bit of smoke and mirrors. Create an interface based on the NEW values you WANT them to be, then change them to respectively use getter/setter to retain original and not break it.

    To expand from your expanded question. You would have to adjust each of those levels too.. Define an interface for the “Barbaz” and “BarBaz” class so your outer class can have an object of

    public interface IYourBarBazInterface
    {
         string BarBazProp1 { get; set; }
         string AnotherProp { get; set; }
    }
    
    public interface IQuux
    {
        int QuuxProp { get; set; }
        string AnotherQuuxProp { get; set; }
    }
    
    public interface IYourCommonInterface
    {
         string LogMsgNo { get; set; };
         string RevNo { get; set; };
         string ReqSox { get; set; };
    
         // Similar principle of declarations, but interface typed objects
         IYourBarBazInterface MyBarBaz { get; set; }
         List<IQuux> MyQuuxList;
         void DoSomething();
    }
    
    
    
    public class Foobar : IYourCommonInterface
    {
         public string Logmsgno;
         public string Revno;
         public string Reqsox;
         public void Dosomething();
    
         // your existing old versions keep same name context
         // but showing each of their respective common "interfaces"
         public IYourBarBazInterface mybarbaz;
         public List<IQuux> myQuuxlist = new List<IQuux>();
    
    
         // these are the implementations of the interface...
         public string LogMsgNo
         { get { return Logmsgno; }
           set { Logmsgno = value; }
         }
    
         public string RevNo
         { get { return Revno; }
           set { Revno = value; }
         }
    
         public string ReqSox
         { get { return Reqsox; }
           set { Reqsox = value; }
         }
    
         public void DoSomething()
         { Dosomething(); }
    
         // Now, the publicly common Interface of the "IYourCommonInterface"
         // that identify the common elements by common naming constructs.
         // similar in your second class.
         public IYourBarBazInterface MyBarBaz 
         { get { return mybarbaz; }
           set { mybarbaz = value; }
         }
    
         public List<IQuux> MyQuuxList
         { get { return myQuuxlist; }
           set { myQuuxlist = value; }
         }
    }
    
    
    public class FooBar : IYourCommonInterface
    {
         // since THIS version has the proper naming constructs you want,
         // change the original properties to lower case start character
         // so the interface required getter/setter will be properly qualified
    
         public string logMsgNo;
         public string revNo;
         public string reqSox;
    
         public IYourBarBazInterface MyBarbaz;
         public List<IQuux> Myquuxlist;
    
    
    
         // these are the implementations of the interface...
         public string LogMsgNo
         { get { return logMsgMo; }
           set { logMsgNo = value; }
         }
    
         public string RevNo
         { get { return revNo; }
           set { revNo = value; }
         }
    
         public string ReqSox
         { get { return reqSox; }
           set { reqSox = value; }
         }
    
    
         // Since your "DoSomething()" method was already proper case-sensitive
         // format, you can just leave THIS version alone
         public void DoSomething()
         { .. do whatever .. }
    
    
    
         public IYourBarBazInterface MyBarBaz 
         { get { return MyBarbaz; }
           set { MyBarbaz = value; }
         }
    
         public List<IQuux> MyQuuxList
         { get { return myquuxlist; }
           set { myquuxlist = value; }
         }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have Web Application which should use JSF 2.0 libraries included in WEB-INF/lib... but
I have web page which works fine on browser on device but when i
I have web service which i want to use to upload image to the
I have web service which return json string like : d={main0ID:abc.es/main,main1ID:ah/main} I wanna append
I have web-service which give list of property at a particular area My problem
I have web service, which use integrated security in IIS. Now, I want to
I have web page in PHP which displays all records in a table. I
I have web page which is passing a querystring parameter to page 2: <a
I have web application written in java using Eclipse. It has just one servlet
I have web application which we deployed in a production . We have separate

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.