Click here to Skip to main content
15,892,737 members
Home / Discussions / C#
   

C#

 
GeneralRe: Resize controls at runtime (borderless form) Pin
Member 1407482711-Oct-19 1:24
Member 1407482711-Oct-19 1:24 
AnswerRe: Resize controls at runtime (borderless form) Pin
Eddy Vluggen11-Oct-19 1:29
professionalEddy Vluggen11-Oct-19 1:29 
GeneralRe: Resize controls at runtime (borderless form) Pin
Member 1407482711-Oct-19 2:25
Member 1407482711-Oct-19 2:25 
GeneralRe: Resize controls at runtime (borderless form) Pin
Eddy Vluggen11-Oct-19 2:29
professionalEddy Vluggen11-Oct-19 2:29 
GeneralRe: Resize controls at runtime (borderless form) Pin
Rob Philpott11-Oct-19 3:03
Rob Philpott11-Oct-19 3:03 
GeneralRe: Resize controls at runtime (borderless form) Pin
Eddy Vluggen11-Oct-19 3:07
professionalEddy Vluggen11-Oct-19 3:07 
AnswerRe: Resize controls at runtime (borderless form) Pin
BillWoodruff21-Oct-19 3:49
professionalBillWoodruff21-Oct-19 3:49 
Question2D Arrays Pin
LilJokez_Gaming10-Oct-19 11:27
LilJokez_Gaming10-Oct-19 11:27 
hey trying to get my code to dispaly a times table but it just comes out in a straight line








using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TestLibary;

namespace ICA25
{
    class Program
    {
        static void Main(string[] args)
        {
            string sTitle;
            bool bExit = false;

            sTitle = ("ICA 25 - Times table");
            Console.WriteLine("{0,60}\n", sTitle);


            do
            {
                {
                    int[,] iFinal;
                    int iNum = GetValue("Please enter the size (4-20) of the times table: ", 4, 20);

                    Console.Write("Here is the times table for that size: \n");
                    iFinal = GenerateTT(iNum);
                    DisplayTT(iFinal);
                }
            }
            while ((YesNo("Would you like to do another? Y or N:") == "Y") && !bExit);
            bExit = true;
        }


        static public int GetValue(string s, int iMin, int iMax)
        {
            int iNum;
            Utilities.GetValue(out iNum, s, 4, 20);
            return iNum;
        }


        static public int[,] GenerateTT(int iValue)
        {
            int[,] iNum = new int[iValue, iValue];

            for (int iRow = 0; iRow < iNum.GetLength(0); iRow++)
            {
                for (int iCol = 0; iCol < iNum.GetLength(1); iCol++)
                {
                    iNum[iRow, iCol] = (iCol) * (iRow);
                }
            }
            return iNum;
        }

        static public void DisplayTT(int[,] iFinal)
            
        {
            for (int iRow = 0; iRow < iFinal.GetLength(0); iRow++)
            {
                {
                    for (int iCol = 0; iCol < iFinal.GetLength(1); iCol++)
                    {
                        Console.Write( iFinal[iRow, iCol]);
                        {
                            Console.WriteLine();
                        }
                    }
                }
            }
        }

        static public string YesNo(string sPrompt)
        {
            string stemp;

            do
            {
                Console.Write("{0}", sPrompt);
                stemp = Console.ReadLine().ToString().ToUpper();
                if (stemp == "N")
                {
                    Console.Write("Bye");
                    Console.ReadLine();

                }
                if (stemp != "Y" && stemp != "N")
                {
                    Console.Write("\nPlease answer Y or N.");
                }
            }
            while ((stemp != "Y") && (stemp != "N"));
            return stemp;
        }

    }
}

AnswerRe: 2D Arrays Pin
Luc Pattyn10-Oct-19 13:11
sitebuilderLuc Pattyn10-Oct-19 13:11 
QuestionHelp with WMI Connect Remotely Pin
mniceguy819-Oct-19 4:30
mniceguy819-Oct-19 4:30 
AnswerRe: Help with WMI Connect Remotely Pin
Dave Kreskowiak9-Oct-19 6:47
mveDave Kreskowiak9-Oct-19 6:47 
GeneralRe: Help with WMI Connect Remotely Pin
mniceguy819-Oct-19 22:28
mniceguy819-Oct-19 22:28 
AnswerRe: Help with WMI Connect Remotely Pin
Richard MacCutchan9-Oct-19 8:51
mveRichard MacCutchan9-Oct-19 8:51 
GeneralRe: Help with WMI Connect Remotely Pin
Dave Kreskowiak9-Oct-19 9:09
mveDave Kreskowiak9-Oct-19 9:09 
GeneralRe: Help with WMI Connect Remotely Pin
mniceguy819-Oct-19 9:26
mniceguy819-Oct-19 9:26 
AnswerRe: Help with WMI Connect Remotely Pin
OriginalGriff9-Oct-19 9:37
mveOriginalGriff9-Oct-19 9:37 
GeneralRe: Help with WMI Connect Remotely Pin
mniceguy819-Oct-19 9:40
mniceguy819-Oct-19 9:40 
QuestionSimple API to record AVI Files Pin
TyrionTheImp9-Oct-19 2:03
TyrionTheImp9-Oct-19 2:03 
AnswerRe: Simple API to record AVI Files Pin
Richard MacCutchan9-Oct-19 2:49
mveRichard MacCutchan9-Oct-19 2:49 
QuestionWhy is the dataGridView1_SortCompare function not working ? Pin
Member 24584678-Oct-19 23:29
Member 24584678-Oct-19 23:29 
QuestionRe: Why is the dataGridView1_SortCompare function not working ? Pin
Richard MacCutchan8-Oct-19 23:37
mveRichard MacCutchan8-Oct-19 23:37 
AnswerRe: Why is the dataGridView1_SortCompare function not working ? Pin
Member 24584679-Oct-19 15:20
Member 24584679-Oct-19 15:20 
GeneralRe: Why is the dataGridView1_SortCompare function not working ? Pin
Richard MacCutchan9-Oct-19 21:38
mveRichard MacCutchan9-Oct-19 21:38 
GeneralRe: Why is the dataGridView1_SortCompare function not working ? Pin
Member 245846710-Oct-19 18:17
Member 245846710-Oct-19 18:17 
GeneralRe: Why is the dataGridView1_SortCompare function not working ? Pin
Richard MacCutchan10-Oct-19 22:03
mveRichard MacCutchan10-Oct-19 22:03 

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.