I am building a Blazor serverside application and I've run into what seems to be a trivial problem, but I can't figure out what's wrong. I have a class called TestMonitorDUT.cs in my ViewModels folder, and a page called TestMonitor.razor. In the razor page, I have the following lines where I simply make a new TestMonitorDUT and try to call a member function:
@code {
TestMonitorDUT DUT = new TestMonitorDUT("1");
DUT.PopulateDictionaries();
In this situation, I get the error message: "The name 'DUT' does not exist in the current context."
I am very confused because DUT is clearly defined right there. Thanks for your time