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

C#

 
GeneralRe: gettin some error @ run time Pin
ankitjain111026-Aug-09 0:32
ankitjain111026-Aug-09 0:32 
GeneralRe: gettin some error @ run time Pin
Luc Pattyn26-Aug-09 0:35
sitebuilderLuc Pattyn26-Aug-09 0:35 
AnswerRe: gettin some error @ run time Pin
Blue_Boy26-Aug-09 0:45
Blue_Boy26-Aug-09 0:45 
GeneralRe: gettin some error @ run time Pin
ankitjain111026-Aug-09 0:58
ankitjain111026-Aug-09 0:58 
Questiondeploy shared assembly with application during setup Pin
Abdul Rahman Hamidy25-Aug-09 23:56
Abdul Rahman Hamidy25-Aug-09 23:56 
AnswerRe: deploy shared assembly with application during setup Pin
Keith Barrow26-Aug-09 0:29
professionalKeith Barrow26-Aug-09 0:29 
GeneralRe: deploy shared assembly with application during setup Pin
Abdul Rahman Hamidy26-Aug-09 1:04
Abdul Rahman Hamidy26-Aug-09 1:04 
QuestionC# Beginner needs help. Pin
LighthouseCall25-Aug-09 23:26
LighthouseCall25-Aug-09 23:26 
Im not sure if i did the right thing to post here, i went through a few threads and i couldnt figure this thing out. sorry it's my first message, also im just learning c# and i have no idea wat error i have..
Should i post this somewhere else or create a message everytime?

This is my program:


using System;

class Work1
{
public static void Main()
{
int amount;

Console.WriteLine("Enter wage");
int wage = Console.ReadLine();

Console.WriteLine("Enter hours");
int hours = Console.ReadLine();

amount = (hours * wage);
Console.WriteLine("Amount = ", amount);
Console.ReadLine();

}
}



Im trying to learn c# and tried something very simple. wage*hours = my money. but of course i failed doing so.



Error 1
Cannot implicitly convert type 'string' to 'int' C:\Users\Saliba\Documents\Visual Studio 2008\Projects\Project2\Project2\Class1.cs 12 19 Project2

//refers to this line = int wage = Console.ReadLine();


Error 2 Cannot implicitly convert type 'string' to 'int' C:\Users\Saliba\Documents\Visual Studio 2008\Projects\Project2\Project2\Class1.cs 15 25 Project2


//refers to this line = int hours = Console.ReadLine();

those are the errors.

i know its pretty frustrating for admins and moderators to stay deleting/ moving posts. im sorry if this is the case.

thanks for future help, Luke
AnswerRe: C# Beginner needs help. Pin
stancrm25-Aug-09 23:36
stancrm25-Aug-09 23:36 
AnswerRe: C# Beginner needs help. Pin
benjymous25-Aug-09 23:36
benjymous25-Aug-09 23:36 
AnswerRe: C# Beginner needs help. Pin
Luc Pattyn25-Aug-09 23:42
sitebuilderLuc Pattyn25-Aug-09 23:42 
AnswerRe: C# Beginner needs help. Pin
kKamel26-Aug-09 0:02
kKamel26-Aug-09 0:02 
AnswerRe: C# Beginner needs help. Pin
Luc Pattyn26-Aug-09 0:24
sitebuilderLuc Pattyn26-Aug-09 0:24 
AnswerRe: C# Beginner needs help. Pin
DaveyM6926-Aug-09 0:28
professionalDaveyM6926-Aug-09 0:28 
AnswerRe: C# Beginner needs help. Pin
LighthouseCall26-Aug-09 3:32
LighthouseCall26-Aug-09 3:32 
QuestionAppending byte array to a byte array Pin
deep725-Aug-09 23:21
deep725-Aug-09 23:21 
AnswerRe: Appending byte array to a byte array Pin
stancrm25-Aug-09 23:25
stancrm25-Aug-09 23:25 
GeneralRe: Appending byte array to a byte array Pin
deep727-Aug-09 2:12
deep727-Aug-09 2:12 
AnswerRe: Appending byte array to a byte array Pin
Hristo-Bojilov25-Aug-09 23:43
Hristo-Bojilov25-Aug-09 23:43 
AnswerRe: Appending byte array to a byte array Pin
DaveyM6926-Aug-09 0:01
professionalDaveyM6926-Aug-09 0:01 
AnswerRe: Appending byte array to a byte array [modified] Pin
DaveyM6926-Aug-09 2:32
professionalDaveyM6926-Aug-09 2:32 
GeneralRe: Appending byte array to a byte array Pin
deep727-Aug-09 2:15
deep727-Aug-09 2:15 
QuestionHow to navigate inside a folder from picture to picture Pin
kKamel25-Aug-09 23:15
kKamel25-Aug-09 23:15 
AnswerRe: How to navigate inside a folder from picture to picture Pin
OriginalGriff25-Aug-09 23:27
mveOriginalGriff25-Aug-09 23:27 
GeneralRe: How to navigate inside a folder from picture to picture Pin
kKamel25-Aug-09 23:42
kKamel25-Aug-09 23:42 

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.