Hello friends. Today i am learning about another workflow how to learn and write exercises. If you see last post about hello world, using dotnet new console -n HelloGame, i ended up having several of folder and files just for a "hello world!" exercise.
> HelloGame
> bin/Debug/net10.0
> ref
> refint
> obj
HelloGame.csproj
Program.cs
I think that is a lot of files and folder.
And yes, i found another workflow. I can simply make a file exercise01.cs, write code in it, and compile it from the terminal. And my folder will fill up with simple 1 file for 1 exercise.
> exercise
exercise01.cs
exercise02.cs
exercise03.cs
exercise04.cs
etc..
This is how i do it:
1. Create a folder name exercise.
2. Create a new file exercise01.cs
3. Write the exercise code
4. Save the file
5. Go to the terminal and type:
:~/csharp/exercise$ dotnet run exercise01.cs
And done. One exercise, one file. Simple. Here,s how we done it:
1. Open the folder we have created.
2. Trust the folder.
3. Create a new file, name it exercise01.cs, then type the code.
4. Save it (ctrl + s). Then open terminal either the integrated one in VS Code (number 1) or just gnome terminal (number 3). run: dotnet run exercise01.cs and voila.. "Hello World!" .
Simple isn't it?
Well, good luck on your journey.. I will be posted every now and then but if you really want a tutorial just like i am doing for now (learning from open ai), please comment and i will see what i can do.