Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. file based username and pass

file based username and pass

Scheduled Pinned Locked Moved C#
tutorialquestion
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    techker2
    wrote on last edited by
    #1

    hey guys is there an example on how to get username and password in a file? input username and pass look it up if ok write ok..

    M L S 3 Replies Last reply
    0
    • T techker2

      hey guys is there an example on how to get username and password in a file? input username and pass look it up if ok write ok..

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Most of us use a database for data storage, this article [^]reads and writes to a file and may help you. Getting the logon details are left to the student!

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • T techker2

        hey guys is there an example on how to get username and password in a file? input username and pass look it up if ok write ok..

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        There are many samples of file handling and simple databases to be found on the internet. You should also read Secure Password Authentication Explained Simply[^].

        T 1 Reply Last reply
        0
        • L Lost User

          There are many samples of file handling and simple databases to be found on the internet. You should also read Secure Password Authentication Explained Simply[^].

          T Offline
          T Offline
          techker2
          wrote on last edited by
          #4

          thx guys.i just need it really simple.. the part that im stuck on is the lookup of the user and pass..im of for one but when it comes to to strings i get confused..

          L 1 Reply Last reply
          0
          • T techker2

            thx guys.i just need it really simple.. the part that im stuck on is the lookup of the user and pass..im of for one but when it comes to to strings i get confused..

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            techker2 wrote:

            when it comes to to strings i get confused.

            In what way? You can read a file line by line and use a simple string compare (http://msdn.microsoft.com/en-us/library/858x0yyx(v=vs.110).aspx[^]), to find the keyword you are interested in. Alternatively, you could create a serializable class and let the objects do the work.

            T 1 Reply Last reply
            0
            • L Lost User

              techker2 wrote:

              when it comes to to strings i get confused.

              In what way? You can read a file line by line and use a simple string compare (http://msdn.microsoft.com/en-us/library/858x0yyx(v=vs.110).aspx[^]), to find the keyword you are interested in. Alternatively, you could create a serializable class and let the objects do the work.

              T Offline
              T Offline
              techker2
              wrote on last edited by
              #6

              from the readLine someting like string Lookup = Console.Readline(username and password)

              L 1 Reply Last reply
              0
              • T techker2

                from the readLine someting like string Lookup = Console.Readline(username and password)

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Maybe you should first spend some time studying C# and the basics of .NET. I would recommend .NET Book Zero, by Charles Petzold[^].

                T 1 Reply Last reply
                0
                • L Lost User

                  Maybe you should first spend some time studying C# and the basics of .NET. I would recommend .NET Book Zero, by Charles Petzold[^].

                  T Offline
                  T Offline
                  techker2
                  wrote on last edited by
                  #8

                  Just started school not to long ago..i just wanted to practice some stuff before a project.. Thx!

                  L 1 Reply Last reply
                  0
                  • T techker2

                    Just started school not to long ago..i just wanted to practice some stuff before a project.. Thx!

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Then that book I suggested is an excellent introduction to C# and would help you a lot in any small project. It is very well written with lots of sample code, and easy to read, even if English is not your first language.

                    1 Reply Last reply
                    0
                    • T techker2

                      hey guys is there an example on how to get username and password in a file? input username and pass look it up if ok write ok..

                      S Offline
                      S Offline
                      Syed M Hussain
                      wrote on last edited by
                      #10

                      Have a look at this ini file reader, http://www.hostprojects.net/cs/35/simple-inifile-reader[^]

                      www.snippetbank.net

                      T 1 Reply Last reply
                      0
                      • S Syed M Hussain

                        Have a look at this ini file reader, http://www.hostprojects.net/cs/35/simple-inifile-reader[^]

                        www.snippetbank.net

                        T Offline
                        T Offline
                        techker2
                        wrote on last edited by
                        #11

                        great!just downloaded the book.. thx for the help guys!

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups