Click here to Skip to main content
15,897,334 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Richard Deeming21-Sep-17 6:19
mveRichard Deeming21-Sep-17 6:19 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3321-Sep-17 6:40
Bootzilla3321-Sep-17 6:40 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3321-Sep-17 18:19
Bootzilla3321-Sep-17 18:19 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3322-Sep-17 2:54
Bootzilla3322-Sep-17 2:54 
AnswerRe: How to handle multiple exceptions(Try..Catch) Pin
eddieangel19-Sep-17 6:07
eddieangel19-Sep-17 6:07 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3319-Sep-17 6:14
Bootzilla3319-Sep-17 6:14 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
eddieangel19-Sep-17 6:30
eddieangel19-Sep-17 6:30 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3319-Sep-17 6:58
Bootzilla3319-Sep-17 6:58 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
eddieangel19-Sep-17 7:17
eddieangel19-Sep-17 7:17 
GeneralRe: How to handle multiple exceptions(Try..Catch) Pin
Bootzilla3319-Sep-17 7:28
Bootzilla3319-Sep-17 7:28 
QuestionXSL to get only elements which have no childs Pin
MrKBA18-Sep-17 23:27
MrKBA18-Sep-17 23:27 
AnswerRe: XSL to get only elements which have no childs Pin
Pete O'Hanlon18-Sep-17 23:49
mvePete O'Hanlon18-Sep-17 23:49 
GeneralRe: XSL to get only elements which have no childs Pin
MrKBA19-Sep-17 0:26
MrKBA19-Sep-17 0:26 
Questioni need Visual Studio .NET 2002 prerequisites cd Pin
michael nabil18-Sep-17 23:05
michael nabil18-Sep-17 23:05 
AnswerRe: i need Visual Studio .NET 2002 prerequisites cd Pin
OriginalGriff18-Sep-17 23:14
mveOriginalGriff18-Sep-17 23:14 
QuestionMessage Closed Pin
16-Sep-17 18:15
professionalHardevsinh Mori16-Sep-17 18:15 
AnswerRe: SQLTransaction Pin
OriginalGriff16-Sep-17 19:57
mveOriginalGriff16-Sep-17 19:57 
GeneralRe: SQLTransaction Pin
Hardevsinh Mori16-Sep-17 20:24
professionalHardevsinh Mori16-Sep-17 20:24 
GeneralRe: SQLTransaction Pin
Hardevsinh Mori16-Sep-17 20:26
professionalHardevsinh Mori16-Sep-17 20:26 
GeneralRe: SQLTransaction Pin
OriginalGriff16-Sep-17 21:44
mveOriginalGriff16-Sep-17 21:44 
GeneralRe: SQLTransaction Pin
Hardevsinh Mori16-Sep-17 21:47
professionalHardevsinh Mori16-Sep-17 21:47 
GeneralRe: SQLTransaction Pin
OriginalGriff16-Sep-17 21:49
mveOriginalGriff16-Sep-17 21:49 
GeneralRe: SQLTransaction Pin
Hardevsinh Mori16-Sep-17 21:51
professionalHardevsinh Mori16-Sep-17 21:51 
GeneralRe: SQLTransaction Pin
OriginalGriff16-Sep-17 21:58
mveOriginalGriff16-Sep-17 21:58 
Questionc# project Pin
Member 1341347616-Sep-17 11:26
Member 1341347616-Sep-17 11:26 
I am new to programming (very new and super confused lol) and I am stuck on a section of my programming assignment

To sum it up , I have to make a cookie calorie calculator. one cookie is 75 calories

This is what I have

C#
int cookies; // number of cookies eaten
int caloriesPercookie = 75; // number of calories per cookies
int totalCalories;

totalCalories = (cookies * caloriesPercookie);


I want to multiple the cookie by the calories. In c# its saying " use of unassigned local variable 'cookies'"

I thought I assigned it properly. How would I correct it? thanks for any help

modified 16-Sep-17 20:07pm.

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.