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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:48:03+00:00 2026-05-26T20:48:03+00:00

I’m refactoring some code I didn’t write, that contains business logic and proprietary algorithms

  • 0

I’m refactoring some code I didn’t write, that contains business logic and proprietary algorithms I don’t want to expose. All the code is currently marked as internal; for testing purposes, and to ensure I don’t break existing clients/services, I wanted to switch them to use interfaces, and implement those interfaces.

I’ve marked my classes as internal and their members as protected internal, and my interfaces as internal, but to use the internal interfaces, I’ve had to make several of my properties public.

I believe, and with some limited testing, seemed to have proven that only friend assemblies, and classes in my assembly, can use these internal interfaces and classes.

As long as both the class, and interface remain internal, even if some of the methods and the properties are marked public, will they be exposed at all?

It doesn’t seem so, but I’m looking for anything I might have missed.

  • 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-26T20:48:03+00:00Added an answer on May 26, 2026 at 8:48 pm

    If you mean protected as in a using assembly can’t directly use them, then yes, if the interface and class are marked internal, then they won’t be visible outside the assembly. Think of the access level on the interfaces and members as being separate locks to get through.

    If you can see the interface at its access level, then you can store a reference to it, and then if you can see the properties/methods at their access levels, then you can call/set/get them.

    Keep in mind, though, as @phoog points out that protected internal is a bit looser than internal.

    All this said, if your internal class implements a public interface, and those properties are part of a public interface as well, they could be visible… But that’s really getting obscure…

    public interface IVisible
    {
        string VisibleProperty { get; set; }
    }
    
    internal class InvisibleClass : IVisible
    {
        public string VisibleProperty { get; set; }
    }
    

    In the above, you could refer to the class InvisibleClass through an IVisible reference in a different assembly if you could find a way to construct or receive a reference to it (for instance, if it were returned from a factory method inside of the original assembly).

    All this aside, if your question is that you want to avoid them from being examined through a decompiler, reflection, etc, that’s a different question…

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
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
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported

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.