wademi
asked on
C# method that returns date
I need help creating a method in C# that returns the "start date of last month" and the "Current date" . I am not sure of the best way to return the dates .
I would like to be able to use the return value in another method and refer to the dates like:
Returnval.MonthStartdate
Returnval.Currentdate
Maybe the method should return the dates as an Enum
The dates should be in the format like 11/15/2011 and be a string.
I would like to be able to use the return value in another method and refer to the dates like:
Returnval.MonthStartdate
Returnval.Currentdate
Maybe the method should return the dates as an Enum
The dates should be in the format like 11/15/2011 and be a string.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No assist for kaufmed?... =\
Open in new window
Then use that new definition as your return type:
Open in new window
Then it becomes a matter of simply creating a new instance of the data structure, populating it, and returning it.