C
C#13mo ago
Quan

C# help CS0103

I followed directions can someone tell me what i did wrong int[] salesValues = { 1000, 1500, 1800, 2600, 2500, 900 }; int runningTotal = 0; // Clear the ListBox for each calculation lstSales.Items.Clear(); // Calculate and display running total foreach (var value in salesValues) { runningTotal += value; lstSales.Items.Add($"Running Total: {runningTotal}"); }
No description
No description
No description
5 Replies
Angius
Angius13mo ago
lstSales variable doesn't exist anywhere
Quan
QuanOP13mo ago
how do i fix it my proffesor didnt add it in the code? @ZZZZZZZZZZZZZZZZZZZZZZZZZ
Angius
Angius13mo ago
¯\_(ツ)_/¯ My bet is that some control in your form should be named lstSales
Quan
QuanOP13mo ago
aww thanks might have to email him
SG97
SG9713mo ago
most likely that listBox1
Want results from more Discord servers?
Add your server