tagged [oop]
How to get a JavaScript object's class?
How to get a JavaScript object's class? I created a JavaScript object, but how I can determine the class of that object? I want something similar to Java's `.getClass()` method.
- Modified
- 27 Dec at 13:4
What is the difference between a field and a property?
What is the difference between a field and a property? In C#, what makes a field different from a property, and when should a field be used instead of a property?
- Modified
- 20 Jul at 04:54
Why can an abstract class have constructor?
Why can an abstract class have constructor? Why does an abstract class have constructor? What's the point? It's obvious that we cannot create an instance of an abstract class.
- Modified
- 13 Nov at 03:24
Are global static classes and methods bad?
Are global static classes and methods bad? It's generally agreed upon that relying heavily on global stuff is to be avoided. Wouldn't using static classes and methods be the same thing?
- Modified
- 30 Jun at 18:28
why can we declare delegates outside a class? Is it not against OOP concept?
why can we declare delegates outside a class? Is it not against OOP concept? According to oops fundamentels, everything has to be inside a class. Then why are we allowed to create delegates outside a ...
What is the reasoning behind the Interface Segregation Principle?
What is the reasoning behind the Interface Segregation Principle? The Interface Segregation Principle (ISP) says that many client specific interfaces are better than one general purpose interface. Why...
- Modified
- 3 Sep at 13:31
What is the difference between __init__ and __call__?
What is the difference between __init__ and __call__? I want to know the difference between `__init__` and `__call__` methods. For example:
- Modified
- 29 Nov at 00:0
What is the difference between old style and new style classes in Python?
What is the difference between old style and new style classes in Python? What is the difference between old style and new style classes in Python? When should I use one or the other?
- Modified
- 29 Oct at 14:2
OOP vs Functional Programming vs Procedural
OOP vs Functional Programming vs Procedural What are the differences between these programming paradigms, and are they better suited to particular problems or do any use-cases favour one over the othe...
- Modified
- 16 Sep at 09:15
Inheritable only inside assembly in C#
Inheritable only inside assembly in C# In C# Is there way to specify a class to be inherited only by a class present in the same assembly and for other assemblies should behave like a public sealed ty...
- Modified
- 10 Mar at 13:56
Why are methods virtual by default in Java, but non-virtual by default in C#?
Why are methods virtual by default in Java, but non-virtual by default in C#? In Java, methods are virtual by default; C# is the opposite. Which is better? What are the advantages and disadvantages in...
Interface or an Abstract Class: which one to use?
Interface or an Abstract Class: which one to use? Please explain when I should use a PHP `interface` and when I should use an `abstract class`? How I can change my `abstract class` in to an `interface...
- Modified
- 24 May at 16:11
why main method in c# is always placed inside the class but not in c++
why main method in c# is always placed inside the class but not in c++ Why we put `main()` method always inside the `class` in C# while in c++ it always placed outside of the `class`.
- Modified
- 25 Jan at 12:48
Partial class in PHP like we have in C#
Partial class in PHP like we have in C# Is there any simple way to have a concept of in like we have in ? I've tried to make it possible using different namespace but it couldn't work.
How to use internal class of another Assembly
How to use internal class of another Assembly I have a third party assembly and I would like to use its `Internal` class in my new C# project. Is it possible? Any example would really be appreciated
- Modified
- 26 Nov at 08:51
What does Resharper mean by "Object allocation (evident)"?
What does Resharper mean by "Object allocation (evident)"? Resharper highlights the new keyword in my code with a hint "Object allocation (evident)". What does this mean? ![Resharper highlighting "Obj...
Creating an empty object in Python
Creating an empty object in Python Are there any shortcuts for defining an empty object in Python or do you always have to create an instance of a custom empty class? Edit: I mean an empty object usab...
Static Method of a Static Class vs. Static Method of a Non-Static Class ( C# )
Static Method of a Static Class vs. Static Method of a Non-Static Class ( C# ) I was asked the above question in an interview. Could you please explain the differences? ( performance - memory - usage ...
how to convert ListItemCollection (dropdownlist.items) to a dictionary<string,string>?
how to convert ListItemCollection (dropdownlist.items) to a dictionary? How to convert `ListItemCollection` (`DropDownList.items`) to a `Dictionary`(I know it can be done through for each loop) is the...
When to use an interface instead of an abstract class and vice versa?
When to use an interface instead of an abstract class and vice versa? This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of...
- Modified
- 24 Sep at 04:2
Why should constructors on abstract classes be protected, not public?
Why should constructors on abstract classes be protected, not public? ReSharper suggests changing the accessibility of a `public` constructor in an `abstract` class to `protected`, but it does not sta...
- Modified
- 28 Jan at 17:26
Abstract Class Constructor
Abstract Class Constructor > [Why can’t I create an abstract constructor on an abstract C# class?](https://stackoverflow.com/questions/504977/why-cant-i-create-an-abstract-constructor-on-an-abstract-...
Is serializable attribute needed in concrete C# class?
Is serializable attribute needed in concrete C# class? In C#, consider we have a class and a class is it necessary to mark ConcreteUser as `[Serializable]` or inheritance will take care of it?
- Modified
- 15 Nov at 12:50