Click here to Skip to main content
15,915,160 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need Guidens Pin
Abhinav S25-Nov-13 21:37
Abhinav S25-Nov-13 21:37 
QuestionHelp solve the question in a language C #? Pin
Sdam Basha25-Nov-13 5:43
Sdam Basha25-Nov-13 5:43 
SuggestionRe: Help solve the question in a language C #? Pin
Richard MacCutchan25-Nov-13 5:49
mveRichard MacCutchan25-Nov-13 5:49 
AnswerRe: Help solve the question in a language C #? Pin
OriginalGriff25-Nov-13 6:01
mveOriginalGriff25-Nov-13 6:01 
AnswerRe: Help solve the question in a language C #? Pin
Abhinav S25-Nov-13 6:33
Abhinav S25-Nov-13 6:33 
GeneralRe: Help solve the question in a language C #? Pin
harold aptroot25-Nov-13 6:44
harold aptroot25-Nov-13 6:44 
AnswerRe: Help solve the question in a language C #? Pin
DaveyM6926-Nov-13 5:27
professionalDaveyM6926-Nov-13 5:27 
QuestionPassing a value from a method to the Main() Pin
Member 982953625-Nov-13 5:10
Member 982953625-Nov-13 5:10 
Hi could someone please help me fix this simple program of mine. I'm trying to explore c# and i really want to learn so please bear with me and help me.

What I want to do is that from the method getDrawer it will ask the user to input the number of drawers you want, then it will pass the answer to the Main() My code below has an error please help me fix this. Thank you very much. Here is my code so far:

C#
using System;
	public class DesksP
	{
		int Main()
		{
			int drawerValue;
			int drawerA = getDrawer(drawerValue);
			Console.WriteLine("The number of drawers is/ are:{0}", drawerA);
		}
		
		private static int getDrawer(int drawerValue)
		{
			Console.WriteLine("Enter number of drawers: ");
			drawerValue = Convert.ToInt16((Console.ReadLine()));
			return drawerValue;
		}
		
	}

AnswerRe: Passing a value from a method to the Main() Pin
Richard MacCutchan25-Nov-13 5:48
mveRichard MacCutchan25-Nov-13 5:48 
AnswerRe: Passing a value from a method to the Main() Pin
OriginalGriff25-Nov-13 6:10
mveOriginalGriff25-Nov-13 6:10 
GeneralRe: Passing a value from a method to the Main() Pin
Member 982953625-Nov-13 6:48
Member 982953625-Nov-13 6:48 
GeneralRe: Passing a value from a method to the Main() Pin
Ravi Bhavnani25-Nov-13 6:56
professionalRavi Bhavnani25-Nov-13 6:56 
GeneralRe: Passing a value from a method to the Main() Pin
OriginalGriff25-Nov-13 8:00
mveOriginalGriff25-Nov-13 8:00 
QuestionSpeechlib Pin
wernlin25-Nov-13 3:40
wernlin25-Nov-13 3:40 
AnswerRe: Speechlib Pin
Dave Kreskowiak25-Nov-13 4:40
mveDave Kreskowiak25-Nov-13 4:40 
GeneralRe: Speechlib Pin
wernlin25-Nov-13 5:03
wernlin25-Nov-13 5:03 
GeneralRe: Speechlib Pin
Dave Kreskowiak25-Nov-13 9:27
mveDave Kreskowiak25-Nov-13 9:27 
GeneralRe: Speechlib Pin
wernlin25-Nov-13 20:57
wernlin25-Nov-13 20:57 
GeneralRe: Speechlib Pin
Dave Kreskowiak26-Nov-13 1:21
mveDave Kreskowiak26-Nov-13 1:21 
GeneralRe: Speechlib Pin
wernlin26-Nov-13 1:39
wernlin26-Nov-13 1:39 
GeneralRe: Speechlib Pin
Dave Kreskowiak26-Nov-13 4:13
mveDave Kreskowiak26-Nov-13 4:13 
GeneralRe: Speechlib Pin
wernlin27-Nov-13 5:30
wernlin27-Nov-13 5:30 
Questionchange text from form Pin
messages25-Nov-13 3:33
messages25-Nov-13 3:33 
AnswerRe: change text from form Pin
Richard MacCutchan25-Nov-13 4:54
mveRichard MacCutchan25-Nov-13 4:54 
GeneralRe: change text from form Pin
messages25-Nov-13 5:20
messages25-Nov-13 5:20 

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.