Click here to Skip to main content
15,919,340 members
Home / Discussions / C#
   

C#

 
AnswerRe: simple 2d graphics with c# Pin
Ed.Poore11-Mar-07 8:50
Ed.Poore11-Mar-07 8:50 
Questionmarshaling of the const char * Pin
MinaFawzi11-Mar-07 6:21
MinaFawzi11-Mar-07 6:21 
AnswerRe: marshaling of the const char * Pin
Ed.Poore11-Mar-07 7:52
Ed.Poore11-Mar-07 7:52 
QuestionPassing member variables as private method arguments? Pin
David Veeneman11-Mar-07 5:38
David Veeneman11-Mar-07 5:38 
AnswerRe: Passing member variables as private method arguments? Pin
S. Senthil Kumar11-Mar-07 5:55
S. Senthil Kumar11-Mar-07 5:55 
GeneralRe: Passing member variables as private method arguments? Pin
David Veeneman11-Mar-07 7:32
David Veeneman11-Mar-07 7:32 
AnswerRe: Passing member variables as private method arguments? Pin
Christian Graus11-Mar-07 4:55
protectorChristian Graus11-Mar-07 4:55 
AnswerRe: Passing member variables as private method arguments? Pin
Leslie Sanford11-Mar-07 16:52
Leslie Sanford11-Mar-07 16:52 
I raised this issue on comp.object. You can read my original post here[^]. Be sure to read the replies.

At one point, I was using your approach and to an extra step in making my private methods static. My main reasoning is that I didn't like my private methods changing the state of the object. For example, say that a public method needs to call two private methods, one right after the other, in order to perform a task. Say that the first private method alters the state of the object. Also, say that it's possible for the second private method to fail for some reason. If the first method alters state and the second method fails, you will need to revert the state to its earlier, pre-error condition. My approach at the time was to call my private methods, passing them whatever info they needed, store the results of the methods in local variable (to the public method), and finally update the object's state once the private methods have completed.

However, I have fallen out of this practise, if for no other reason than laziness. Most of my private methods can alter state and such. I'm a little uncertain, still, if this is good design.
GeneralRe: Passing member variables as private method arguments? Pin
David Veeneman11-Mar-07 7:36
David Veeneman11-Mar-07 7:36 
GeneralRe: Passing member variables as private method arguments? Pin
David Veeneman12-Mar-07 4:14
David Veeneman12-Mar-07 4:14 
QuestionGenerate Panel Pin
shamsteady11-Mar-07 5:35
shamsteady11-Mar-07 5:35 
AnswerRe: Generate Panel Pin
Dave Kreskowiak11-Mar-07 6:48
mveDave Kreskowiak11-Mar-07 6:48 
QuestionAutomatically paste into active window from my code Pin
Cedric_NewUser11-Mar-07 5:19
Cedric_NewUser11-Mar-07 5:19 
QuestionHow to create a control panel for my DVD Playback Windows Application Pin
Khoramdin11-Mar-07 4:04
Khoramdin11-Mar-07 4:04 
AnswerRe: How to create a control panel for my DVD Playback Windows Application Pin
Christian Graus11-Mar-07 4:51
protectorChristian Graus11-Mar-07 4:51 
GeneralRe: How to create a control panel for my DVD Playback Windows Application Pin
Khoramdin11-Mar-07 6:16
Khoramdin11-Mar-07 6:16 
QuestionData Adaptor parameter in Sub Pin
moali7211-Mar-07 0:36
moali7211-Mar-07 0:36 
GeneralALREADY POSTED Pin
CPallini11-Mar-07 0:55
mveCPallini11-Mar-07 0:55 
QuestionAdd panel Pin
shamsteady10-Mar-07 23:21
shamsteady10-Mar-07 23:21 
AnswerRe: Add panel Pin
Dawid Mazuruk10-Mar-07 23:27
Dawid Mazuruk10-Mar-07 23:27 
GeneralRe: Add panel Pin
shamsteady10-Mar-07 23:32
shamsteady10-Mar-07 23:32 
QuestionDataGridView Data Filtering Pin
freshonlineMax10-Mar-07 21:19
freshonlineMax10-Mar-07 21:19 
AnswerRe: DataGridView Data Filtering Pin
il_masacratore12-Mar-07 2:47
il_masacratore12-Mar-07 2:47 
QuestionScroll Problem Pin
MHASSANF10-Mar-07 19:34
MHASSANF10-Mar-07 19:34 
AnswerRe: Scroll Problem Pin
sam#10-Mar-07 19:50
sam#10-Mar-07 19:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.