lobsterTail
New member
- Joined
- Jun 3, 2023
- Messages
- 4
- Programming Experience
- 3-5
I have below class model.
I have List<Cart> subsequently produce a text file with above column headers. My question is- how can i format the StartingDate into the format i want using string.Format() string method in the model above so i don't have to loop into the list to do it after the fact?
something like
thanks.
C#:
public class Cart
{
public int CartDetailsId { get; set; }
public int CartHeaderId { get; set; }
public DateTime StartingDate { get; set; }
public int Count { get; set; }
}
I have List<Cart> subsequently produce a text file with above column headers. My question is- how can i format the StartingDate into the format i want using string.Format() string method in the model above so i don't have to loop into the list to do it after the fact?
something like
C#:
public Date StartingDate { get; set; } =string.Format()??
thanks.