Hello,
I have a function that basically does:
internal static short GetPresentYear()
{
return Convert.ToInt16(DateTime.Now.Year - 1);
}
Now when I try using the function, the debugger shows that I'm getting 0x07d9
instead of the year 2008...
What am I doing wrong here? How do I make it return 2008?
Thanks.
Edit: I know I can use int
instead of short
but the database is designed to store smallint
and so I'm forced to use a short
.