All Questions
Tagged with polymorphism c#
23 questions
1
vote
1
answer
167
views
Entity Framework - component shop using polymorphism and generic repository
I am creating a .NET Framework MVC EF application for PC components. I wanted to make full use of inheritance, polymorphism and generic repository pattern - but was wondering if my initial design ...
4
votes
2
answers
385
views
Animal, Dog, and IDangerous - Using interfaces and inheritance with C#
I'm quite new to object-oriented C#. I wanted to test my knowledge by creating a Dog/Animal classes. I also tried to implement ...
3
votes
0
answers
1k
views
POLYMORPHISM - Design a database connection and command
> Exercise 1: Design a database connection
To access a database, we need to open a connection to it first and close it once our job is done.
Connecting to a database depends on the type of the ...
1
vote
1
answer
2k
views
Builder pattern in C# supporting subclassing with nested classes [closed]
[Posted yesterday on Software Engineering, but was apparently "disappeared"...maybe better here]
Background: I am just starting to get my head around the idea of separating the domain model from the ...
2
votes
1
answer
1k
views
Polymorphic DBConnector class exercise
GitHub
GitHub if it's easier
I'm in the process of doing a training course in C#. I've just gone over covering Polymorphic OOP / composition over inheritance etc...
The latest exercise I completed ...
6
votes
1
answer
2k
views
Making TypeNameHandling in json.net more convenient
Handling abstract types in json.net can be sometimes challenging because it requires a very long and complex syntax like:
...
-2
votes
1
answer
186
views
Document Management Properties and Searching
This is the 'middle-ware' for a document management application. A document has properties which describe it, and allow users to search for it. The server will interact with the database, and the User-...
5
votes
2
answers
266
views
Free general e-book downloader
So I decided to expand a little one-off C# console program I wrote awhile ago to download the free e-book offered by Syncfusion, and decided to also do it for other free e-book publishers... like O'...
11
votes
1
answer
200
views
Multiple similar manager classes for handling scroll lists
I am working on my first object-oriented programming project, written in C# for Unity. My code does what I want it to do, but I am wondering if there is a better way to do it. I think I am building ...
0
votes
1
answer
24k
views
Calculate the area of different shapes using polymorphism (virtual and override methods)
I have written code to calculate the area of different shapes using polymorphism (virtual and override methods) and it is working as expected. Can anyone please review this and let me know how I can ...
11
votes
1
answer
362
views
Accessing the Stack Exchange API
Part of a project I'm getting started on requires access to the Stack Exchange API for certain data, as a result I built a .NET implementation to interact with it.
The implementation is pretty simple,...
0
votes
2
answers
126
views
6
votes
2
answers
757
views
Dependency problem in C#, through polymorphism, and appropriate design pattern
I'm currently working on a project which involves EntityFramework with a (very) rich model (lots of inheritance). I'm currently facing a problem, quite interesting in my opinion.
My model is ...
5
votes
1
answer
998
views
Calculating a postfix expression
I've got the following code in my calculator project:
...
6
votes
2
answers
1k
views
Google reCAPTCHA Validator: Iteration II
This is a follow-up to the other post I made (less than an hour ago) about my Google reCAPTCHA C# implementation: Google reCAPTCHA Validator
This adds support for error messages, so that you can ...