• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: What is the equivalent DateAndTime.DateAdd in C#

Resolved: What is the equivalent DateAndTime.DateAdd in C#

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have an old code written in VB.Net and I am trying to convert it into c#. I am stuck on DateAndTime.DateAdd conversion for c#
This is my old vb.net code. It is getting the current month and subtracting – one month from it.
How do I achieve this c#?

Answer:

Use DateTime.AddMonths.
Pay attention:

Returns a new DateTime


If you have better answer, please add a comment about this, thank you!

c# vb.net vb.net-to-c#
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to scroll bottom of div at launch?

02/04/2023

Resolved: how to get and read an xml file in a zip file using xml.etree

02/04/2023

Resolved: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed. cors error not resolving

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.