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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:19:13+00:00 2026-05-11T10:19:13+00:00

What is the point of writing an interface without members ? INamingContainer is one

  • 0

What is the point of writing an interface without members ?

INamingContainer is one example in .NET Framework. And it’s described in MSDN as :

Identifies a container control that creates a new ID namespace within a Page object’s control hierarchy. This is a marker interface only.

Is it used for just this kind of blocks :

if (myControl is INamingContainer) {     // do something } 

Or are there other advantages of it ?

EDIT : It was called Marker Interface Pattern (thanks Preet)

  • 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. 2026-05-11T10:19:14+00:00Added an answer on May 11, 2026 at 10:19 am

    This is to ensure that you can treat a collection of objects as the same type and then perform some operations on that type (You know that it must inherit from object).

    Think of it like attributes. It’s type meta data.

    You also might want to perform an operation on a known type (e.g. System.Web.UI.Control) but only perform that operation if the type inherits from a certain interface (e.g. INamingContainer).

    foreach(var ctrl in this.Controls) {     if (ctrl is INamingContainer)     {         // Do something on the control     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a game bootloader for x86. At one point, early in the booting,
I'm writing an application where user can point a position in a Google Maps
I'm writing a script and at some point I call to command1 which does
I am writing a template class which takes a floating-point-like type (float, double, decimal,
I am writing certain code in MIPS and I've come to the point where
I am currently writing an application where the user has, at some point, to
I am using the following functions for writing and reading 4098 floating point numbers
I'm writing my master thesis, which deals with AOP in .NET, among other things,
I'm writing an interface to a web service where we need to upload configuration
I'm tasked with writing an application that acts as a central storage point for

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.