How to return the number of a month in C# function
- by john
I want to return the number of a month and i made a function but it always returns 0
this is my code:
public int getNrMonth(String s)
{
int nr=0;
if (s.Equals("January"))
nr = 1
if (s.Equals("February"))
nr = 2;
return nr;
}
Could someone tell me wath is wrong please? I'm beginner!