I have a static开发者_高级运维 class that contains my database logic. This class is used in a website, web services and as part of a middleware component.
I\'ve asked myself this question a number of times when creating classes, particularly those involving collections, but I\'ve never come up with a satisfactory answer. It\'s a OOP design question.
I have a class that has to take product information from one system\'s database and save it to another system\'s product database.
I am designing a class library which will be used like this: Engineeng = new Engine(); eng.AddPart(part).AddPart(otherPart).Run();
In C#, what is the purpose of marking a class static? If I have a class that has only static methods, I can mark the class static or not.Why would I want to mark the class static?Would I ever NOT wan
I have a prototype with a Form class which auto-generates an HTML form, and now I am plugging some processing functionality into the prototype.
Or in more specific words, is it \"ok\" to not be relying on setters and getters? I\'m dealing with a class that checks the availability of rooms and sets public properties of which there are more th
I am programming a simple role playing game (to learn and for fun) and I\'m at the point where I\'m trying to come up with a way for game objects to interact with each other. There are two things I am
Given class A, which contains sets of raw data, and class B,开发者_JAVA百科 which contains a re-organized version (GUI ready) of that data I would like to make the raw data in A visible in B.
It seems to me that non-public top-level classes and static nested classes essentially perform the same tasks when creating a helper class.