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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:48:33+00:00 2026-05-28T16:48:33+00:00

Trying to understand something that I don’t know how to describe because I don’t

  • 0

Trying to understand something that I don’t know how to describe because I don’t understand it 🙁

Let’s say I’m making a zoo application and I would like to sell different animals for the zoo. I imagine having a IAnimal interface like the following:

public interface IAnimal
{
  string Talk { get; set; }
}

Now will I create a project for Cat and a project for Dog

public class Cat : IAnimal
{
...  
}

let’s say i give away the zoo application and the user opens it, what’s the code look like to check what animals this user has purchase?

  • 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-28T16:48:34+00:00Added an answer on May 28, 2026 at 4:48 pm

    This is a prime case for Dependency Injection using the Inversion of Control pattern. StructureMap is an open source project that allows you to inject dependencies into your application. It allows you to say, “In this assembly, find all of the implementations of a particular interface and allow me to create an instance of any of those implementations”. This loose coupling makes for easier unit testing scenarios as well.

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

Sidebar

Related Questions

I'm trying to understand a problem I have run into that I don't believe
I am trying to decipher someone's code and I see something that I don't
I'm trying to understand this so I can do something similar. I know: buf
I'm trying to analyse iPhone Crash Reports. And there is something that I don't
Trying to understand something. I created a d:\svn\repository on my server. I committed folders
I'm trying to understand on a deeper level if I'm missing something as to
I am trying to understand the difference between this: if (isset($_POST['Submit'])) { //do something
I'm trying to understand REST. Under REST a GET must not trigger something transactional
Just trying to understand that - I have never used it before. How is
I'm trying experiment with DabbleDB to see if it's something that I could use

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.