Current Year in ASP.NET MVC 3
Try the following:
Copyright @@ @DateTime.Now.Year
In a .razor page in an ASP.NET Core application, e.g. within the <div> </div>
of your footer, the following works too:
Copyright © @DateTime.Now.Year
Added the copyright sign too and the double @@ is not needed in a razor page; it gives an error.