Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

c# user access login detail storing

Posted on 2013-01-18
3
256 Views
Last Modified: 2013-01-23
Hi

I am developing an application with an MDI form, and the first thing the user does is login, so a login form is the first thing they see.

I have created a login script, which checks the database and returns true/false of the details are correct.  Now, I need to store the login details somewhere that is accessible from all forms in the application (on a website I would store them in a session variable) what is the way to do this in c#?

Cheers

CD
0
Comment
Question by:cycledude
  • 2
3 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 38792352
A singleton class is probably what you are looking for.

http://en.wikipedia.org/wiki/Singleton_pattern
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 38792354
Also this for some implementations:
http://csharpindepth.com/Articles/General/Singleton.aspx
0
 

Author Closing Comment

by:cycledude
ID: 38811634
thanks andy
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
System.Security 2 28
EF5: Question about Metadata Artifact Processing 4 22
MailAddress in vb 4 29
.NET Enums [Flags] & Bitwise Design Question 6 26
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question