Adding the Classes

Learn how to add C# classes to the Blazor WebAssembly project.

We'll cover the following

We need to add both an ExpenseType class and an Expense class. We do this as follows:

  1. Right-click the ExpenseTracker.Shared folder and select the “Add, Class” option from the menu.

  2. Name the new class ExpenseType.

  3. Click the “Add” button.

  4. Make the class public by adding the public modifier:

Get hands-on with 1400+ tech skills courses.