In the last tutorial, I showed you how to instantiate a project in MonoGame.
In today’s tutorial, I will show you how to create a file with a class and implement it in the basic project.
Create a file in the folder named MyGame001 and rename this file ProblemReport.cs.
Add this source code to this file.
// use namespace similar to the rest of the project
public class ProblemReport
public static void test()
// source code
This created class can be used in various C# files, but now as an example, I have added it in the Game1.cs file:
ProblemReport p = new ProblemReport();
You can see how the C# files were created to run the application correctly:
[mythcat@desk MyGame001]$ dotnet run Program.cs
First on run is Program.cs then Game1.cs with the class ProblemReport from ProblemReport.cs.