Introduction
This code snippet is shows how to find current company Notice Period using C#
Code :
- using System;
-
- public class Program
- {
- public static void Main()
- {
- int days = 90;
- string YourDate = "5/7/2016";
- string formated_date = String.Format("{0:d/M/yyyy}", Convert.ToDateTime(YourDate));
- DateTime date = Convert.ToDateTime(formated_date);
- Console.WriteLine("Last working day of current company is " + String.Format("{0:d/M/yyyy}", date.AddDays(days)));
- }
- }
Output
Last working day of current company is 3/10/2016
Demo : https://dotnetfiddle.net/9KzXu4