what's is the difference between object vs Object, exception vs Exception

J

Jon Skeet [C# MVP]

Ryan Liu said:
In C#, what's is the difference between object vs Object, exception vs
Exception?

object and System.Object are exactly the same (although you don't need
a "using System;" to use object).

There's no "exception" keyword in C# though.
 
J

Jeroen

Hi Ryan,

Probably what you're thinking about when talking about 'exception' is
the snippet available in Visual Studio. If you want to see what it
does start typing 'exception', and hit the 'TAB' key a few times to
complete and then also *insert* the snippet (i.e. it will insert some
default code for creating a class that inherits from "Exception").

To be clear, object/Object and exception/Exception are completely
different 'pairs'.

Regards,
Jeroen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top