Im getting the following error:
Cannot use local variable \'dob\' before it is declared
Here is my implementation
pu
You've declared a local variable in getFormattedDoB called dob. The compiler can't tell the difference between that and the member dob. Try adding "this" where you mean the member variable rather than the local:
DateTime origin = DateTime.Parse(this.dob);
Better still, don't use the same name for the local variable.
Edit: Unless you did actually intended to set the member variable and not create a new one. In which case remove the "string" as Andrew suggested.