how to get the today date in csharp

Code Example - how to get the today date in csharp

                
                        DateTime today = DateTime.Now;
                    
                
 

csharp get current date

                        
                                DateTime now = DateTime.Now;
                            
                        
 

csharp get today's date

                        
                                DateTime today = DateTime.Today;
                            
                        
 

csharp datetime current

                        
                                DateTime now = DateTime.Now;
string strDate = now.ToString("YYYY-MM-dd");