Need in const string GET YEAR
const string DATE_FORMAT = DateTime.Now.ToString('yyyy');Need in const string GET YEAR
const string DATE_FORMAT = DateTime.Now.ToString('yyyy');Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal YelvePosted Dec 15, 2022, 1:40 PM
Ill suggest to go with readonly
Vishal YelvePosted Dec 15, 2022, 2:01 PM
Goran BibicPosted Dec 15, 2022, 1:50 PM
Error CS0236 A field initializer cannot reference the non-static field, method, or property 'Program._year'