Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help ..... PinPopular
OriginalGriff11-Nov-13 22:35
mveOriginalGriff11-Nov-13 22:35 
GeneralRe: Need help ..... Pin
superselector12-Nov-13 0:57
superselector12-Nov-13 0:57 
AnswerRe: Need help ..... Pin
Mycroft Holmes11-Nov-13 23:22
professionalMycroft Holmes11-Nov-13 23:22 
QuestionChange Content of Button Pin
Member 1037988611-Nov-13 10:27
Member 1037988611-Nov-13 10:27 
AnswerRe: Change Content of Button Pin
Pete O'Hanlon11-Nov-13 10:32
mvePete O'Hanlon11-Nov-13 10:32 
GeneralRe: Change Content of Button Pin
Member 1037988611-Nov-13 11:00
Member 1037988611-Nov-13 11:00 
GeneralRe: Change Content of Button Pin
Pete O'Hanlon11-Nov-13 11:18
mvePete O'Hanlon11-Nov-13 11:18 
Questionc# - Cinema system - Noob need help - 2d arrray - Pin
cSharpDonkey11-Nov-13 4:21
cSharpDonkey11-Nov-13 4:21 
Im working on a project for school, im suppose to make a console application which will show a Cinema system with 20 seats on 15 rows. I am very green on c# - so any help, Critism, or general thoughts are much appreciated!

I got a 2d array set up now, functionally and with space in between items so its not a mess to look at..
Im trying to take the program to the next level now, my program must show which seats are available, and which are taken,
and the program must let you book certain seats, and random seats.
I was thinking to make all the available seats green, and once you booked your seats they should go red -

How can i start doing this proberly?
I think im looking for background Color, and maybe If / else statements?

Here is how my program looks so far:

C#
Console.WriteLine("|--------------------------CINEMA--------------------------|\n");
            int[,] pladser = new int[,]
                {
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
              {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
           };

                for (int x = 0; x < pladser.GetLength(0); x++)
                {
                    for (int y = 0; y < pladser.GetLength(1); y++)
                    {
                        Console.Write("{0,3}",pladser[x, y]);

                    }
                    Console.WriteLine();

AnswerRe: c# - Cinema system - Noob need help - 2d arrray - Pin
GuyThiebaut11-Nov-13 4:42
professionalGuyThiebaut11-Nov-13 4:42 
AnswerRe: c# - Cinema system - Noob need help - 2d arrray - Pin
Pete O'Hanlon11-Nov-13 4:43
mvePete O'Hanlon11-Nov-13 4:43 
AnswerRe: c# - Cinema system - Noob need help - 2d arrray - Pin
OriginalGriff11-Nov-13 5:18
mveOriginalGriff11-Nov-13 5:18 
AnswerRe: c# - Cinema system - Noob need help - 2d arrray - Pin
V.11-Nov-13 20:18
professionalV.11-Nov-13 20:18 
Questionsubtract list first element with second one,third with secon one an so on Pin
Member 1038120910-Nov-13 22:57
Member 1038120910-Nov-13 22:57 
AnswerRe: subtract list first element with second one,third with secon one an so on Pin
OriginalGriff10-Nov-13 23:05
mveOriginalGriff10-Nov-13 23:05 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Member 1038120910-Nov-13 23:14
Member 1038120910-Nov-13 23:14 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Pete O'Hanlon10-Nov-13 23:26
mvePete O'Hanlon10-Nov-13 23:26 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Member 1038120910-Nov-13 23:32
Member 1038120910-Nov-13 23:32 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Pete O'Hanlon10-Nov-13 23:47
mvePete O'Hanlon10-Nov-13 23:47 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Member 1038120911-Nov-13 0:16
Member 1038120911-Nov-13 0:16 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Pete O'Hanlon11-Nov-13 0:21
mvePete O'Hanlon11-Nov-13 0:21 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
Richard MacCutchan11-Nov-13 3:37
mveRichard MacCutchan11-Nov-13 3:37 
GeneralRe: subtract list first element with second one,third with secon one an so on Pin
OriginalGriff10-Nov-13 23:35
mveOriginalGriff10-Nov-13 23:35 
QuestionImport Dll in the Application Pin
Member 913191910-Nov-13 20:23
Member 913191910-Nov-13 20:23 
AnswerRe: Import Dll in the Application Pin
Abhinav S10-Nov-13 20:40
Abhinav S10-Nov-13 20:40 
AnswerRe: Import Dll in the Application Pin
Alan Balkany14-Nov-13 4:49
Alan Balkany14-Nov-13 4:49 

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.