© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
8 replies
captainbulba

Storing login data

Hello everyone!

I am trying to build a simple school management system in console. Once a user login I want to store some of the data in order to avoid querying for that data again. What would be the best approach?

I thought of using static such as

 public static class Login
    {
        public static string login { get; set; }
        public static bool teacherFlag { get; set; }
        public static bool adminFlag { get; set; }

    }
 public static class Login
    {
        public static string login { get; set; }
        public static bool teacherFlag { get; set; }
        public static bool adminFlag { get; set; }

    }


But from what I read this approach is not good as multiple applications can mix up the information.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Storing static data
C#CC# / help
3y ago
✅ Storing data per user
C#CC# / help
3y ago
❔ Getting cross-platform directories for storing data
C#CC# / help
3y ago
Storing protobuf in the database
C#CC# / help
7mo ago