C
C#5mo 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
BigBoyConst5mo 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
Pobiega5mo 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 chatgpt5mo ago
Nullable Reference Type is good thing. I love it too.
Angius
Angius5mo ago
This template would just have nullable disabled
Why
BigBoyConst
BigBoyConst5mo 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
Pobiega5mo 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
Angius5mo ago
Or Console.ReadLine() ?? "" if we want to be idiomatic
Want results from more Discord servers?
Add your server
More Posts
Handling [Autorize] attribute without oAuth/jwt tokens.Is it possible to use the existing asp.net [Authorize] attribute with non jwt tokens that are validaDownload audio file from blobHello! I'm trying to download an audio file from an open unsecured blob with a URL that starts with Razor MVC UI reuseI cant believe that I cannot figure this out, but how do I create the equivalent of a react or blazodoes this work for choosing a random item in a list then removing it then choosing again```int randomNumber = Random.Range(spawnInts[0], spawnInts.Count); spawnInts.Rem✅ MySQL with Entity Framework, getting null of entity all time```cs public class UserAssignmentDate { [ForeignKey("UserId")] public int UserId { get; set;Looking to not include the ground in my racing game to collide and trigger the event for FMODI have some code I am using to trigger as sound when colliding with objects in my racing game I am w✅ How to do the C# equivalent of passing an std::function into a classHi, so I'm trying to make a class function that can accept a function of type float(float). I don't MudBlazor Generic Server Side Table IssuesHello all, I am attempting to make a more "generic" MudTable on Blazor Server, as I use them frequen.NET Core & React | AuthenticationSo I want to create a new webapp with React and .NET Core. I created a new project in Visual Studio Clean architecture and EF entities as domain modelsHi! I have an architecture inspired mostly by Ardalis's Clean Architecture. It comprises 3 (theoreti