C# primitive types Vs. .NET types

G

Guest

Please, could anyone tell me what differences is in using C# data types or
..NET types. For example in what situations I would have to use .NET types
instead of C# types. Lets take C# bool and .NET Boolean for example. The help
is very much appreciated.

Thanks.
 
J

Joerg Jooss

Peter said:
Please, could anyone tell me what differences is in using C# data
types or .NET types. For example in what situations I would have to
use .NET types instead of C# types. Lets take C# bool and .NET
Boolean for example. The help is very much appreciated.

There's no difference. The C# type names map directly to their CLR
counterparts and are simply just different (i.e. C++ like) names.

Cheers,
 
M

Morten Wennevik

Hi Peter,

There are no C# primitives. C# bool is an alias for System.Boolean
 
J

Jon Skeet [C# MVP]

Peter said:
Please, could anyone tell me what differences is in using C# data types or
.NET types. For example in what situations I would have to use .NET types
instead of C# types. Lets take C# bool and .NET Boolean for example. The help
is very much appreciated.

The C# type names are just shorthands for the .NET names.
 
C

Cor Ligthert

Peter,

All dotNet languages use for the managedcode the same "value" types from the
current framework from dotNet.

To make it a more General answer.

Cor

"Peter"
 

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