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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:29:04+00:00 2026-05-17T06:29:04+00:00

I am developing a class library that will be used in several projects. In

  • 0

I am developing a class library that will be used in several projects.

In my class library, I have a “Shape” Class which has a number of properties.
One of these properties is “Dimensions” returns a class with “Height” “Width” and “Depth” properties.

How would I suppress the Dimension class from being viewable in the editor, whilst freely avilable in the class library?

I’ve put a command in the class file, but this hides it in the library and my application.

<ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)> _

I have also changed the class acess modifier to Friend, but this prevents Public access to the Property in the Shape class when called outside the class library.

All I want to do is prevent creating an Instance of the Dimension class outside the class library.

Thanks.

This is the code functionality I like to achieve:

Interface IShape

    ReadOnly Property Properties() As ShapeProperties

End Interface

Public Class Shape

    Implements IShape

    Dim _Properties As New ShapeProperties(0, 0, 0)

    Sub New()
        _Properties = New ShapeProperties(3, 4, 5)
    End Sub

    Public ReadOnly Property Properties() As ShapeProperties Implements IShape.Properties
        Get
            Return _Properties
        End Get
    End Property

End Class

Friend Class ShapeProperties

    Dim _Height As Integer = 0
    Dim _Width As Integer = 0
    Dim _Depth As Integer = 0

    Friend Sub New(ByVal h As Integer, ByVal w As Integer, ByVal d As Integer)
        _Height = h
        _Width = w
        _Depth = d
    End Sub

    Private ReadOnly Property Height() As Integer
        Get
            Return _Height
        End Get
    End Property
    Private ReadOnly Property Width() As Integer
        Get
            Return _Width
        End Get
    End Property
    Private ReadOnly Property Depth() As Integer
        Get
            Return _Depth
        End Get
    End Property

End Class

I could not compile the Class Library in the above code. I want ShapeProperties to be only accessible in the Shape class, not on its own. The only way I was able to resolve this was to change the access property of ShapeProperties which is not what I want.

ClassLibrary.Shape is OK but
ClassLibrary.Properties is not.

Thanks.

  • 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-17T06:29:04+00:00Added an answer on May 17, 2026 at 6:29 am

    You could make a public interface (IShape) and make a private class that implements it.

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

Sidebar

Related Questions

I'm developing a class library that will be used in a number of different
I am developing a class library (C#) that i will use it for my
I am developing a simple class library project, which will give me a dll.
I'm developing a class library in .NET that other developers will consume eventually. This
I'm about to set out on developing a .NET class library that will be
I'm developing a technical library class that can be used on both types of
I'm developing an WPF application that has an reference of a C# Class Library.
I'm building a class library that will have some public & private methods. I
I'm developing a class library that implements a protocol stack. There I have an
I'm developing a class library to be used for other developers and will be

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.