"return"
- How do I get a "return" to go to the beginning of , say, a string?
Answers
I think he means "goto", but rather needs to start by learning the basics of object oriented programming. In order to avoid being a spaghetti coder.
Good coding involves knowing one's logical limits and expanding them as necessary.- Marked As Answer byRudedog2ModeratorWednesday, November 04, 2009 2:32 PM
- Don't use goto. Replace it with looping logic such as while:
private void button1_Click(object sender, EventArgs e)
{
while(true)
{
MessageBox.Show("HAHA!");//shows a messagebox forever.
}
}
Good coding involves knowing one's logical limits and expanding them as necessary.- Marked As Answer byDr. C. Nile Dementia Wednesday, November 04, 2009 12:41 AM
All Replies
- You're going to have to explain more clearly, your question makes no sense. Do you mean return as in the return keyword in C#? Because that's not what it does.
I think he means "goto", but rather needs to start by learning the basics of object oriented programming. In order to avoid being a spaghetti coder.
Good coding involves knowing one's logical limits and expanding them as necessary.- Marked As Answer byRudedog2ModeratorWednesday, November 04, 2009 2:32 PM
Here's what I have:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace Separate_Project_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void button1_Click(object sender, EventArgs e)
{
string loop;
{
loop = MessageBox.Show("HAHA!");
}
goto loop;
}
}
}
what am I doing wrong?- Don't use goto. Replace it with looping logic such as while:
private void button1_Click(object sender, EventArgs e)
{
while(true)
{
MessageBox.Show("HAHA!");//shows a messagebox forever.
}
}
Good coding involves knowing one's logical limits and expanding them as necessary.- Marked As Answer byDr. C. Nile Dementia Wednesday, November 04, 2009 12:41 AM
- Thanks
- If a reply has answered your question, please close the thread by marking the best reply as "Answer".
Mark the best replies as answers. "Fooling computers since 1971."


