User Profile

Collapse

Profile Sidebar

Collapse
Logic
Logic
Last Activity: Feb 24 '11, 10:44 PM
Joined: Feb 13 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thank you very much...

    I run the program; when I initially press (R+Ctrl) or (B+Ctrl), then the pressed key(s) are only Console.ReadKey (true)'ed as you can see on the sixth code line in the above code.

    How to make that specific [Console.ReadKey (true)] on the 6th line to execute only if the the statement is false.
    See more | Go to post

    Leave a comment:


  • Logic
    started a topic How to Read a Specific Line from A Text File?

    How to Read a Specific Line from A Text File?

    Hi, I'm writing a console program in order to make my own keyboard shortcuts.
    Code:
    ConsoleKeyInfo input;
    
    do
    {
           if (File.Exists("info.txt") == true) ; 
           else Console.WriteLine("File not found! \nPress any key to try again..."); Console.ReadKey(true);
    } while (File.Exists("info.txt") == false);
    
    StreamReader reader = new StreamReader("info.txt");
    ...
    See more | Go to post
No activity results to display
Show More
Working...