How to use Console with a Winform App ?
        Posted  
        
            by asksuperuser
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by asksuperuser
        
        
        
        Published on 2010-04-21T21:00:09Z
        Indexed on 
            2010/04/21
            21:03 UTC
        
        
        Read the original article
        Hit count: 257
        
c#
Let's say I have some code inside a Winform. I'd also like to output to Console like this:
        Reader = command.ExecuteReader();
        while (Reader.Read())
        {
            string thisrow = "";
            for (int i = 0; i < Reader.FieldCount; i++)
                thisrow += Reader.GetValue(i).ToString() + ",";
            Console.WriteLine(thisrow);
        }
        connection.Close();
It doesn't crash but I can't see any console. Why ?
© Stack Overflow or respective owner