Posts

Showing posts with the label Constructors

#Constructors

#Constructors   I recently read an article (which I sadly cannot find) about how Constructors should only be used for assignment. I agree to an extent. I think it's fine to have a strictly private "Init" method that is responsible for "setting up" the object, such that you can safely use the object right after instantiation, without having to manually set it up through assignment on properties. I might be misremembering the point of the article, but what is your thoughts on this?