-
Feb 15th, 2021, 06:10 AM
#1
Thread Starter
New Member
Request for Program
Please Help
Code:
public partial class Form1: Form {
public Form1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
listBox1.Items.Clear();
int a,
x,
y,
r,
n,
CDec;
x = CDec textBox1.Text; /
/*what is CDec (Error2 'CDec' is a 'variable' but is used like a 'method')//*
r = CDec(textBox2.Text);
n = CDec(textBox3.Text);
y = x;
}
public object vbTab { get; set; }}
listBox1.Items.Add("X" & vbTab & vbTab & "R" & vbTab & vbTab & vbTab & vbTab & "Total"); -------> //*listBox1 Error 1 A namespace cannot directly contain members such as fields or methods //*/
/
listBox1.Items.Add("--------------------------------------------------"); {
a = 1
Do While a <= n;
Select Case a
Case Is = 1;
r = 1;
Case
Else
r = CDec(textBox2.Text);
} {
total += CDec(y * (r ^ (a - 1)))
listBox.Items.Add(x & vbTab & "x" & vbTab & r & vbTab & "=" & vbTab & (x * r) & vbTab & vbTab & total);
x = x * r
a += 1
}
}
}
Please send me correct code.
Last edited by dday9; Feb 15th, 2021 at 09:30 AM.
-
Feb 15th, 2021, 09:31 AM
#2
Re: Request for Program
Moderators note: this was originally on https://www.vbforums.com/showthread....1283&p=5510996 but spun off onto its own thread.
-
Feb 15th, 2021, 04:13 PM
#3
Re: Request for Program
Originally Posted by dday9
The link is pointed to this thread.
-
Feb 15th, 2021, 04:15 PM
#4
-
Feb 15th, 2021, 07:36 PM
#5
Re: Request for Program
How about you make some sort of effort on your own behalf? Firstly, how are we supposed to know what the correct code is when you have made zero effort to explain anything about what you're trying to achieve? You're expecting us to read the code that doesn't work, understand what it's supposed to be doing and then provide code to actually do that. Would you like us to wipe your nose while we're at it? You need to provide a FULL and CLEAR explanation of the problem, which includes a description of what you're trying to achieve, exactly how you're trying to achieve it and exactly what happens when you try. If the code you have doesn't behave as expected, you have to tell us exactly where and how the actual behaviour differs from your expectation. If there's an error message, tell us what it is and where it's generated. If it's a run time error, you need to have debugged the code and be able to tell us exactly what the application state was at the time. If you'd like us to spend our time helping you, the least you can do is spend a bit of your time to help us do so.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|