A class is a mechanism for creating abstraction.
An abstraction is a bundling of capabilities (methods & state) offering the consuming client (a programmer, often ourselves) something useful in a single concept, while hiding certain details that are irrelevant (sometimes b/c real-world some details are irrelevant, and often b/c the internal implementation of the offering is a detail that the consuming client doesn't/shouldn't need to know about to use it)
It is best to have coherent abstractions. One way to judge the coherence of an abstraction is to look the lifetimes of state. The lifetime of all the fields of an object, ideally, is one and the same (as the object itself).
When the object is created, and its fields are initialized together, and such an object is a more-or-less coherent abstraction. Fields may be updated during the operation of the object, though it always remains in a usable state.
When we find that some object's fields are not necessarily initialized at the same time, it suggests a conflation of two different abstractions.
Thus, given what I can see in your questions, I consider that approach to have room for improvement. You could change it as follows:
remove the DoFunction()
method, and pass the parameters in the constructor so that is the whole purpose of the object
return a different object as the return value, an new class that bundles the various fields of interest together.
this
as the above mentioned object?