C#, .net 3.5sp1 and Visual Studio 2008 sp1 errors list

  • Thread starter Thread starter Andy B.
  • Start date Start date
A

Andy B.

What kind of errors will the errors list show when using C# 3.5sp1 with
Visual Studio 2008sp1?
 
Andy B. said:
What kind of errors will the errors list show when using C# 3.5sp1 with
Visual Studio 2008sp1?
e
Why would you expect any?
On the face of it vs 2008 sp1 will target .Net framework 3.5 sp1 by
default.
 
Andy said:
What kind of errors will the errors list show when using C# 3.5sp1 with
Visual Studio 2008sp1?

That all depends on what kind of errors you have in your code.

Noting, of course, that there's no such thing as "C# 3.5sp1". There's
only "C# 1.0", "C# 2.0", "C# 3.0", and "C# 4.0". Perhaps you meant
".NET 3.5 SP1"?

Pete
 
Uh, yea. Sorry. I was just wondering because I thought I saw somewhere that
the C# compiler would show runtime errors before the code was compiled and
put them in the errors list. Or maybe it was after the code was compiled?
Either way it goes, how do you actually do this?
 
Andy said:
Uh, yea. Sorry. I was just wondering because I thought I saw somewhere that
the C# compiler would show runtime errors before the code was compiled and
put them in the errors list. Or maybe it was after the code was compiled?
Either way it goes, how do you actually do this?

By definition, the compiler will show you compile-time errors only.
Many compile-time errors are designed to prevent run-time errors, but
they aren't run-time errors per se. They are still compile-time errors.

You've either misunderstood something someone wrote, or someone wrote
something that doesn't make sense.

Of course, _after_ the code is compiled, you can run your program. At
which time, the debugger will alert you to run-time errors (i.e.
exceptions…typically NullReferenceException and InvalidCastException,
those being the most common run-time issues you'd run into as far as
coding errors go).

Pete
 
Back
Top