Home > Net >  In the core asp.net 3.1, the program defines a static variable, tried to call other methods or contr
In the core asp.net 3.1, the program defines a static variable, tried to call other methods or contr

Time:09-20

In the core asp.net 3.1, the program defines a static variable, tried to call other methods or controller, how to do?

 
Public static DataTable InitData;
Public static void Main (string [] args)
{
Var host=CreateHostBuilder (args). The Build ();

InitData=(https://bbs.csdn.net/topics/DAL.GetData1);

The host. The Run ();

//CreateHostBuilder (args). The Build (). The Run ();
}



Access to less than in the other classes, could you tell me how to solve this?
  • Related