When not to use a private field
Posted
by coffeeaddict
on Stack Overflow
See other posts from Stack Overflow
or by coffeeaddict
Published on 2010-06-17T20:59:37Z
Indexed on
2010/06/17
21:03 UTC
Read the original article
Hit count: 156
c#
When should it be considered dangerous to use a private field all over the place in the methods of your class? I mostly just create the variable and set it to a default value like null. Then in my methods reference it and set it to an instance of that object type from the methods.
I don't know if my question makes sense but let me know if it doesn't and I'll clarify.
© Stack Overflow or respective owner