Click here to Skip to main content
15,904,497 members
Home / Discussions / C#
   

C#

 
QuestionSearch for non-ASCII characters in a text file Pin
Koshv7-Jun-07 10:22
Koshv7-Jun-07 10:22 
AnswerRe: Search for non-ASCII characters in a text file Pin
Guffa7-Jun-07 13:12
Guffa7-Jun-07 13:12 
Questionbrainbench test with no answer? Pin
brsecu7-Jun-07 10:14
brsecu7-Jun-07 10:14 
AnswerRe: brainbench test with no answer? Pin
Luc Pattyn7-Jun-07 12:45
sitebuilderLuc Pattyn7-Jun-07 12:45 
AnswerRe: brainbench test with no answer? Pin
Vrungar6-Apr-11 9:04
Vrungar6-Apr-11 9:04 
AnswerRe: brainbench test with no answer? Pin
Luc Pattyn6-Apr-11 13:46
sitebuilderLuc Pattyn6-Apr-11 13:46 
QuestionGraphics image convert to GraphicsPath ? Pin
Epsilone37-Jun-07 9:59
Epsilone37-Jun-07 9:59 
AnswerRe: Graphics image convert to GraphicsPath ? Pin
Dave Kreskowiak7-Jun-07 10:39
mveDave Kreskowiak7-Jun-07 10:39 
GeneralRe: Graphics image convert to GraphicsPath ? Pin
Epsilone37-Jun-07 12:14
Epsilone37-Jun-07 12:14 
GeneralRe: Graphics image convert to GraphicsPath ? Pin
Dave Kreskowiak7-Jun-07 13:25
mveDave Kreskowiak7-Jun-07 13:25 
AnswerRe: Graphics image convert to GraphicsPath ? Pin
Christian Graus7-Jun-07 12:09
protectorChristian Graus7-Jun-07 12:09 
GeneralRe: Graphics image convert to GraphicsPath ? Pin
Epsilone37-Jun-07 12:24
Epsilone37-Jun-07 12:24 
GeneralRe: Graphics image convert to GraphicsPath ? Pin
Christian Graus7-Jun-07 15:42
protectorChristian Graus7-Jun-07 15:42 
QuestionHow can I resize the DataGridView back to defult size? Pin
Khoramdin7-Jun-07 9:39
Khoramdin7-Jun-07 9:39 
AnswerRe: How can I resize the DataGridView back to defult size? Pin
Dave Kreskowiak7-Jun-07 10:38
mveDave Kreskowiak7-Jun-07 10:38 
Questionoracle Client Pin
shereem khaleel7-Jun-07 9:34
shereem khaleel7-Jun-07 9:34 
AnswerRe: oracle Client Pin
Rick van Woudenberg7-Jun-07 11:42
Rick van Woudenberg7-Jun-07 11:42 
QuestionNeed to pass structure to assembly Pin
Amit Kumar G7-Jun-07 9:08
Amit Kumar G7-Jun-07 9:08 
AnswerRe: Need to pass structure to assembly Pin
Not Active7-Jun-07 9:16
mentorNot Active7-Jun-07 9:16 
GeneralRe: Need to pass structure to assembly Pin
Amit Kumar G7-Jun-07 9:24
Amit Kumar G7-Jun-07 9:24 
GeneralRe: Need to pass structure to assembly Pin
Not Active7-Jun-07 9:42
mentorNot Active7-Jun-07 9:42 
GeneralRe: Need to pass structure to assembly Pin
Amit Kumar G7-Jun-07 10:04
Amit Kumar G7-Jun-07 10:04 
QuestionHelp with simple guess number - program (while loop) Pin
Husker477-Jun-07 8:27
Husker477-Jun-07 8:27 
I'm a beginner in C# and I tried to make a console program where you enter a number, then the program tells you if your guess was too low or high, and you keep guessing until your guess is correct. I really thought that my code would work, but it doesn't. Can anybody please guide me in the right direction?

<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
<br />
namespace ConsoleApplication1<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            //Variables<br />
            Random a = new Random();<br />
            int counter = 0;<br />
            int guess;<br />
            int rand = 0;<br />
            rand = (int) a.Next(0,10);<br />
<br />
            //Start of the program<br />
            Console.Write("Enter your guess: ");<br />
            guess = Console.Read();<br />
<br />
            //While loop to test the number<br />
            while(guess != rand)<br />
            {<br />
                if(guess > rand)<br />
                {<br />
                    Console.WriteLine("Wrong number, you aimed too high");<br />
                }<br />
<br />
                if(guess < rand)<br />
                {<br />
                    Console.WriteLine("You aimed too low");<br />
                }<br />
<br />
                Console.Write("Please guess again: ");<br />
                guess = Console.Read();<br />
                counter++;<br />
            }<br />
<br />
            //In case your guess was correct<br />
            Console.WriteLine("Congratulations, you rock!");<br />
            Console.WriteLine("It took you {0} tries", counter);<br />
        }<br />
    }<br />
}

AnswerRe: Help with simple guess number - program (while loop) Pin
Luc Pattyn7-Jun-07 8:32
sitebuilderLuc Pattyn7-Jun-07 8:32 
AnswerRe: Help with simple guess number - program (while loop) Pin
Jimmanuel7-Jun-07 8:54
Jimmanuel7-Jun-07 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.