-2
我正在将现有的vb应用程序转换为.net,在现有代码中我找到了以下条件。如何在C#中编写此条件?由于提前C#从日期获取年份
if CLng(Right(request("yr"),4))=CLng(Year(Date())) then
//I am confused only in Year(Date()) how can I replace these functions in C#
我正在将现有的vb应用程序转换为.net,在现有代码中我找到了以下条件。如何在C#中编写此条件?由于提前C#从日期获取年份
if CLng(Right(request("yr"),4))=CLng(Year(Date())) then
//I am confused only in Year(Date()) how can I replace these functions in C#
Year(Date())
可以写成DateTime.Now.Year
好感谢一个lot.it为我工作:) –