When not to use a private field
- by coffeeaddict
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.