Click here to Skip to main content
15,908,173 members
Home / Discussions / C#
   

C#

 
AnswerRe: Thread problem Pin
Elroy Dsilva22-Jul-08 22:04
Elroy Dsilva22-Jul-08 22:04 
QuestionMy sort of first program that doesn't work Pin
DFlat4Now22-Jul-08 17:38
DFlat4Now22-Jul-08 17:38 
I have been studying C# for about 4 or 5 months and then thought "Well I'll just write something from scratch. Well I felt like I've been reading a book on "How To Swim" and then when I jumped in the water I just gasped for air! Well anyway I hoping that someone could look at this and tell me how to use the return for the "public bool TrueOrFalse().

Thanks and sorry this is so elementary. I think I would like to write a book some day named a Beginner Beginner for the Basics of C#. Well any way here it is.

using System;
using System.Collections.Generic;
using System.Text;

namespace StartingOver
{
class RunIt
{
public bool TrueOrFalse()
{
int four = 4;
int five = 5;
bool answer;
Console.WriteLine("4 * 5 should equal: {0}", four * five);
four*five
return answer;
}
public void Getyear()
{
Console.WriteLine("What year will you be beginning?");
string year = Console.ReadLine();
Console.Clear();
Console.WriteLine("Starting all over again in {0}\n", year);
}
static void Main(string[] args)
{
RunIt ri = new RunIt();
ri.Getyear();
ri.TrueOrFalse();
}
}
}
AnswerRe: My sort of first program that doesn't work Pin
John Ad22-Jul-08 20:31
John Ad22-Jul-08 20:31 
AnswerRe: My sort of first program that doesn't work Pin
mark_w_22-Jul-08 22:17
mark_w_22-Jul-08 22:17 
Questionparent form --> MDIChild connection Pin
shadowhazard22-Jul-08 17:32
shadowhazard22-Jul-08 17:32 
AnswerRe: parent form --> MDIChild connection Pin
Mbah Dhaim22-Jul-08 23:24
Mbah Dhaim22-Jul-08 23:24 
QuestionHard Inheritance Questions (for me) Pin
Dirso22-Jul-08 12:53
Dirso22-Jul-08 12:53 
AnswerRe: Hard Inheritance Questions (for me) Pin
Luc Pattyn22-Jul-08 13:26
sitebuilderLuc Pattyn22-Jul-08 13:26 
AnswerRe: Hard Inheritance Questions (for me) Pin
PIEBALDconsult22-Jul-08 14:32
mvePIEBALDconsult22-Jul-08 14:32 
AnswerRe: Hard Inheritance Questions (for me) Pin
Dirso22-Jul-08 16:34
Dirso22-Jul-08 16:34 
AnswerRe: Hard Inheritance Questions (for me) Pin
Giorgi Dalakishvili22-Jul-08 21:32
mentorGiorgi Dalakishvili22-Jul-08 21:32 
GeneralRe: Hard Inheritance Questions (for me) Pin
Dirso23-Jul-08 3:50
Dirso23-Jul-08 3:50 
GeneralRe: Hard Inheritance Questions (for me) Pin
Giorgi Dalakishvili23-Jul-08 4:44
mentorGiorgi Dalakishvili23-Jul-08 4:44 
QuestionLockbits and 8-bit grayscale images Pin
gigahertz20522-Jul-08 12:39
gigahertz20522-Jul-08 12:39 
AnswerRe: Lockbits and 8-bit grayscale images Pin
Guffa22-Jul-08 13:39
Guffa22-Jul-08 13:39 
GeneralRe: Lockbits and 8-bit grayscale images Pin
gigahertz20522-Jul-08 15:26
gigahertz20522-Jul-08 15:26 
GeneralRe: Lockbits and 8-bit grayscale images Pin
Luc Pattyn22-Jul-08 15:42
sitebuilderLuc Pattyn22-Jul-08 15:42 
GeneralRe: Lockbits and 8-bit grayscale images Pin
gigahertz20522-Jul-08 15:50
gigahertz20522-Jul-08 15:50 
GeneralRe: Lockbits and 8-bit grayscale images Pin
Guffa23-Jul-08 4:33
Guffa23-Jul-08 4:33 
QuestionOpen (or focus) forms from listbox items Pin
nelsonpaixao22-Jul-08 12:34
nelsonpaixao22-Jul-08 12:34 
AnswerRe: Open (or focus) forms from listbox items Pin
Luc Pattyn22-Jul-08 13:29
sitebuilderLuc Pattyn22-Jul-08 13:29 
AnswerRe: Open (or focus) forms from listbox items Pin
nelsonpaixao23-Jul-08 14:06
nelsonpaixao23-Jul-08 14:06 
Questiondata insert mysql+c# Pin
SHINOJK22-Jul-08 12:09
SHINOJK22-Jul-08 12:09 
AnswerRe: data insert mysql+c# Pin
Dirso22-Jul-08 12:30
Dirso22-Jul-08 12:30 
GeneralRe: data insert mysql+c# Pin
Mbah Dhaim22-Jul-08 23:37
Mbah Dhaim22-Jul-08 23:37 

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.