encapsulation
Issue with using get keyword in C# relating to inheritance
So I am having some issues with this. I am kinda new to C#. All my attributes are private and I am using the tradi开发者_JS百科tional get and set. It is an abstract class. But in the child class when[详细]
2023-04-04 19:21 分类:问答Accessing private members
I have a class: class A { private: ComplexClass member1; public: getMember1(){return member1;}; }; and I have an implementation that, for code simplification (more easily understandable), needs to[详细]
2023-04-04 12:32 分类:问答How to encapsulate javascript in a server-side language component?
Is there any design pattern or something that I can use to create self-contained components, that encapsulates some functionality that includes adding script tags to the final html output?[详细]
2023-04-02 18:01 分类:问答AS3 internal and custom namespaces
I have the following packages: spark spark.engine Within spark I have a class SeCore; and within spark.engine I have SeStepper and SeKeyboard.[详细]
2023-04-02 04:23 分类:问答Where should I create objects that can be used by other class methods?
I\'m not sure where to create the SolidColorBrush objects. Should they go a) inside the public MainWindow() initialization method, b) directly in the MainWindow class, or c) in a different, new method[详细]
2023-04-02 00:56 分类:问答Does it make sense to make a class in python when it would never get instantiated?
I have some methods in a file and all of them are defined in the global scope (a module). I did not bother to make a class because the class would never get instantiated and everything would still开发[详细]
2023-03-29 01:43 分类:问答Beginner question - Encapsulation and "Proxy Classes"
While learning c#, I have picked up the implication from reading other people\'s cod开发者_JAVA技巧e that it\'s good practice to separate certain classes from the program by use of a sort of \"Proxy C[详细]
2023-03-29 01:37 分类:问答How do i encapsulate an ajax request using jQuery?
i am implementing a PHP application, i am using AJAX heavily in forms to send and retrieve values. the typical jQuery function i am implementing is[详细]
2023-03-28 12:54 分类:问答PHP encapsulation without class?
Is it possible to encapsulate, a variable or function let say, in PHP without wrapping them in a class? What I was doing is:[详细]
2023-03-27 13:07 分类:问答use of public variable in Play! framework model
I came across Play! framework a few days ago.It is mentioned that public variable are used as instance variables in Model.All my life, I have been told that it was a dangerous practice..some other mal[详细]
2023-03-26 22:01 分类:问答
加载中,请稍侯......