Re: Exit Sub in C#
- From: Steve <nospam@xxxxxxxx>
- Date: Wed, 24 May 2006 18:03:49 +0100
On Wed, 24 May 2006 08:14:10 -0700, "Tina"
<tinamseaburn@xxxxxxxxxxxxxxxxxx> wrote:
Wow, I guess I started a religious "return debate". Actually return; was
the first thing I tried
but the compiler flagged it. I find that in C# the compiler will
occasionally flag something as an
error that is not an error. But then when something else is changed, that
is seemingly unrelated, the
flag goes away. This has happend four or five times.
The flag on the return; (the only error left) went away when I tightened up
some white space.
VB never did that.
thanks,
Hi Tina
I think the first thing you should do is forget about what vb does or
doesn't do. C# is a different language and the editor for each
language behave differently to each other.
Each language evolved from a different idea of how a language should
be implemented. They now use the same framework as you know but that
is a relatively recent development. I doubt you find irritation in
the differences between vb and cpp for instance, you expect there to
be. So it's the same with c#.
Whenever I code I get errors occurring that seem unrelated to the
actual problem itself.
eg
class test1
{
abc
public void Func()
{
// do stuff
}
}
an error will be flagged on public because the previous line is
invalid for several reasons.
if I add a ; to the end
abc;
the error moves to the ; telling me I have an invalid token. Obviously
the line terminator isn't an invalid token so the error is somewhere
else. Then changing the declaration to.
private int abc;
fixes the error.
One thing I've learnt is that when there is an error, no matter how
much I think it is with the tool I'm using or language I'm writing in,
99.9% of the time the mistake is mine and I probably need to check
what I've done or do a little more research so I'm more familiar with
the tools I'm using.
cheers
Steve
http://pretty-vacant.co.uk
.
- Follow-Ups:
- Re: Exit Sub in C#
- From: Peter Kirk
- Re: Exit Sub in C#
- References:
- Exit Sub in C#
- From: Tina
- Re: Exit Sub in C#
- From: JimD
- Re: Exit Sub in C#
- From: Tina
- Exit Sub in C#
- Prev by Date: Re: Multiple web services
- Next by Date: Re: Multiple web services
- Previous by thread: Re: Exit Sub in C#
- Next by thread: Re: Exit Sub in C#
- Index(es):
Relevant Pages
|