Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This issue I have it for a while, almost 1 year or more. I tried diverse permutations but always got stuck at some point, when the whole idea will not work anymore. And I give up all the time on it.

I have a class with properties, fields and methods in it. I am thinking to add events to it, but im not that great at them yet. When i call this class into form1 I basically change some values inside class, and the "object" that represents it, will add value or change color or change position ,etc.

If i have a game let's say, when the character stays and I want him to look like it's breathing, this property should be inside the class? or outside, letting me choose when to breathe, how much, how long, how fast,etc. It's just an example. I had a lot of similar (and more complex) encounters with this subject and I simply freeze in the middle of it, not knowing how to manage it anymore.
Both ways are good! From outside or from inside class. But... sometime i need maneuverability, sometime is just in the way and i want it 'there' behind some close door(inside class I mean).

What your rules say about this thing? Should I change its values from inside the class? Or from outside?
Thank you.

What I have tried:

Make this "What have you tried?" textfield, optional ! Not everything is having a direct trial and error but an experience and many failures which can not be put that convenient into words as you(the website) expect. Im not criticizing anything, i just put an option on the table. Consider it or not, nobody cares, but you have something on the table for now.
Posted
Updated 2-Dec-18 3:46am
Comments
OriginalGriff 2-Dec-18 7:45am    
"Make this "What have you tried?" textfield, optional !"
It's there for good reason - to try and focus the mind of the questioner into giving us the information we need to answer his question.

Most of the questions we get are of the "what's wrong with this?" type, where we need to know what they have done so far so we
a) Can answer at all;
b) Can make the answer relevant to their actual code;
And / or
c) Be sure that they have actually tried to do their own damn homework! :laugh:

A question like yours is rarer in QA - it's not a "specific answer question", it's a "discussion question" where there is no right or wrong.
In most cases, "What I have tried" helps us answer, and it was a good help when it was first added.
_Q12_ 2-Dec-18 7:53am    
I agree with your perspective! I really do. I was a teacher myself and i had to create mechanisms not that comfortable for both sides to understand each other better. You are totally right in your point and again, i totally agree with you and website filosofy. Again, it's a fart thought, it's an idea, just had to spit it out, just because i felt is interesting and maybe will give ideas. Do not look at it anymore and forget it if is not in the same wind with your boat.

This isn't really a QA question - there isn't a specific "right answer", or even a class of "right answers" - and I think it would probably be better in a discussion forum.

Can I suggest you post it here:
C# Discussion Boards[^]
Or here:
Design and Architecture Discussion Boards[^] (though this forum gets a lot less traffic so probably is less use to you in the short term).
 
Share this answer
 
Comments
_Q12_ 2-Dec-18 7:56am    
I post it here, for a "Quick answer" - whatever you feel right in the moment.
Yes its a long discution probably, but i want the creme, the conclusion basically. Just tell me A or B and off I go.
OriginalGriff 2-Dec-18 8:20am    
The problem is that isn't an "A" or "B" - it's dependant on the circumstances, and how the class fits into the whole "application environment". You say you were a teacher - so you know that what works for one student will be a total cockup for another. Software design is the same: some is, some isn't!
Hence - this is a discussion, rather than a "solution" and fits better into a discussion format. Just sayin'!
_Q12_ 2-Dec-18 8:35am    
I dont think i have the option to delete my post !
Ha. You delete it then. I dont see if there is a delete button. I relocated the question already so do it for me. Thank you again.
OriginalGriff 2-Dec-18 8:41am    
There is a delete button - if you hover over the question it should appear in the bottom right, shaped like an old fashioned bin.
It's there for me.
_Q12_ 2-Dec-18 9:04am    
i made a screenshot for you :
https://www.deviantart.com/q12a/art/Untitled-copy-775022227
This CodeProject article looks promising: Promises for Game Development[^]
 
Share this answer
 
Comments
_Q12_ 2-Dec-18 9:59am    
Thank you mister Rick !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900