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
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
Create a project template for dotnet new - .NET
Learn how to create a project template for the dotnet new command.
I'd highly recommend learning to use NRTs instead of just disabling them
They actually do something useful, once you learn
Nullable Reference Type is good thing. I love it too.
This template would just have nullable disabledWhy
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
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 caseOr
Console.ReadLine() ?? ""
if we want to be idiomatic