title: C# Get year part from date
body: <p>I am converting an existing vb application to .net, in the existing code i found the condition below.How can I write this condition in C# ? Thanks in Advance</p>
  
  <pre><code>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#
  </code></pre>