.net - How to make a global object in c#? -


i want make objects of defined classes global im getting error. im doing this:

namespace hotelsystem {     public static class globalvariables     {         public static login_log cashier = new login_log();         public static list<customer> customer = new list<customer>();     } } 

and im getting error:

inconsistent accessibility: field type 'hotelsystem.helpers.login_log' less accessible field 'hotelsystem.globalvariables.cashier'  inconsistent accessibility: field type 'system.collections.generic.list<hotelsystem.helpers.customer>' less accessible field 'hotelsystem.globalvariables.customer' 

have tried error saying?

add 'public' login_log class , customer class


Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -