I have a method Age() that returns the age of a car( subtracted from the year of production which is an int based on user input and it has to be an int).
Also, from this method I raise an event that shows me the age of the car. I only need the year, no months or days. My code is something like this and it's not working.The event is raised, but no value is shown. No errors in the code.
public int Age()
{
int Year= DateTime.Now.Year; // only the year in int
int YIP=Year-Year of production; // Year of production from user input
return YIP;
}