C
C#10mo ago
BigBoyConst

Setting a template project

Hey I have a small question. I have a file which contains a lot of functions that I use often in programming and I wanted to set a sort of "template project" to start from every time I make a new solution. This template would just have nullable disabled, have the reference already added to the aforementioned file and also have set implicit usings for said file. I wasn't able to find anything useful online related to this, but my teacher told me it was possible
8 Replies
BigBoyConst
BigBoyConstOP10mo ago
to be clearer, i want it to kinda replace the base project that you get when creating a console app with the comment and the hello world text
Pobiega
Pobiega10mo ago
I'd highly recommend learning to use NRTs instead of just disabling them They actually do something useful, once you learn
i like chatgpt
i like chatgpt10mo ago
Nullable Reference Type is good thing. I love it too.
Angius
Angius10mo ago
This template would just have nullable disabled
Why
BigBoyConst
BigBoyConstOP10mo ago
cause i dont like having the green squiggly line every time i do Console.ReadLine im not like doing advanced programming its a basic college OOP class
Pobiega
Pobiega10mo ago
just write Console.ReadLine()! then if its specifically just that you want to avoid dont turn off the entire feature, just because ReadLine has an edge case
Angius
Angius10mo ago
Or Console.ReadLine() ?? "" if we want to be idiomatic
Want results from more Discord servers?
Add your server