I had a question... I am trying to figure something out, so I can be more confident with my coding.
In a batch file, this is how I do it...
|
how do I do exactly that, in c# ? ... how do I use goto in c# ? like, skip what ever else comes next, and skip to that specific line next..
Thanks guys.
Sam HobbsPosted Jan 11, 2011, 12:55 AM
The advantage of console programs is that you can use them to just do programming that does not need a UI. You often can do things faster without messing with a UI. If the book used console programs to show examples of C#, then you might be missing a lot by skipping over console programs. I often use console programs to figure out how to program something then copy code from the console program to a UI program. A console program is capable of a text-based UI but I don't use that.
theLizardPosted Jan 10, 2011, 10:47 PM
Not really, I don't bother with console stuff at all, to me it is learning something that I will never use, better to learn something that I will use instead of wasting time and effort.
If there is anything that you learn from me let it be that you think outside the square and develop new ideas, don't let others tell you that some things cannot be done (other than the physical) and always believe that there is a solution to every problem no matter how small or large it may be.
thiago costaPosted Jan 10, 2011, 10:35 PM
Thank you... I read much about c# day by day...
I skipped all the console application tutorials that came with my book ... :D .. Maybe that was a bad idea...
But ...
I promisse that I will not give up and I will keep up the learning...
Thx man
theLizardPosted Jan 10, 2011, 9:23 PM
for example, a click of a button can have a number of conditions, a plain click, left or right button click or combination with shift, ctrl, alt so that depending on which combination you call an appropriate function / method, these are things that you learn with experience.
thiago costaPosted Jan 10, 2011, 6:35 PM
I think I know what you mean...
The reason why I asked, is because ... for example"
I think you got the keyword... I wan't to be able to use events comfortably ... But I get a bit confused...
Like in the example above... The event makes the COMPLETED be executed right after it is completed....
This is awesome... This type of thing would make programming so powerful to me...
It's just that, I don't feel too comfortable with the language yet...
Do you have any tips, to help me master event handle and event args ?
Thx man... :D
theLizardPosted Jan 10, 2011, 2:41 AM
I appreciate the kind comments but I am not sure how it would benefit this forums users since the program is written in C++ builder using propriety technology which I developed and is specific to Australian conditions with no source code being available.
Edit:
Mahesh, as an after thought, I know that C# Corner is for C# but if you are willing to start a section for C++ Builder I would be happy to help get it going.
Mahesh ChandPosted Jan 10, 2011, 1:35 AM
I just watched your video on electric meter. Very smart. I am impressed. If it is available for free, please feel free to upload it to the Downloads section of the site for our users.
theLizardPosted Jan 10, 2011, 1:29 AM
Question is, what do you want to achieve, where do you want to go after, goto's are usually associated with procedural programming but this is rarely done these days so you need to think in terms of event driven functions/methods.
thiago costaPosted Jan 9, 2011, 10:55 PM
theLizardPosted Jan 9, 2011, 8:44 PM
Without knowing what you want to achieve and taking a guess as to what you want a switch may be your option.
switch(whatever)
{
case "hello":
place1();
break;
case "place1":
place2();
break;
}