K
K
Konstantin2018-08-01 01:22:05
OOP
Konstantin, 2018-08-01 01:22:05

Am I breaking OOP by using partial classes?

I have:

  • Automatically generated partial classes (Employee, Orders, Clients, etc.)
  • Custom written interfaces for each class (to highlight the logic)

What I want is to add my own partial classes, implement the appropriate interfaces in them and thereby extend the functionality of the classes.
Question: Will I violate the OOP by adding logic elsewhere?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey K, 2018-08-01
@nicebmw9

If we are talking about wpf or something like that, then it is necessary. Do not touch the automatically generated classes, but write the logic in your own (well, or automatically created, but with room for creativity).

B
basrach, 2018-08-01
@basrach

No.
Partail classes are a mechanism of the compiler. OOP is a style of programming. Concepts from different areas and do not intersect in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question