473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

C# primitive types Vs. .NET types

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.
Jul 21 '05 #1
4 7665
Peter wrote:
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,
--
Joerg Jooss
jo*********@gmx.net
Jul 21 '05 #2
Hi Peter,

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

--
Happy Coding!
Morten Wennevik [C# MVP]
Jul 21 '05 #3
Peter <Pe***@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
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"
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.

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ken | last post by:
Hi. Does the Java spec mandate set sizes for primitive types (e.g., int, float, char, etc.)? I know the ANSI C++ standard does not do this, which makes these sizes compiler dependent. So I guess...
3
by: Tony Johansson | last post by:
Hello! I'm reading in a document about window system and here they talk about primitive class. So my question is what is a primitive class? It might not mean any spacial just a name of a...
3
by: case2005 | last post by:
Can anyone help with the following, I don't know if it's possible, but I'm certain there must be a standard way of dealing with this. I have the following: template<typename FooBar, typename...
9
by: Gonçalo Rodrigues | last post by:
Hi all, I have a few questions on primitive types that I will divide in two main questions. I realize that some of these questions -- especially 2. below -- are not directly related to C++ as a...
26
by: Kip | last post by:
Greetings everyone, Is there anyone here who could point me to a page or pdf that has a list of the sizes of all of the C primitive data types on various implementations such as SPARC, x86,...
3
by: Bear | last post by:
Hello there How come it's possible to add values of the type "int" into an ArrayList when the Add member function only accepts values of type "object"? Is an int just a "typedef" of the Int32...
14
by: Matt | last post by:
I want to know if "int" is a primitive type, or an object? For example, the following two approaches yield the same result. > int t1 = int.Parse(TextBox2.Text); //method 1 > int t2 =...
1
by: Neil Zanella | last post by:
Hello all, In C and C++ a primitive data type is represented by a minimum number of bits as defined by the corresponding standard. For instance an int is assumed to be at least 16 bits on all...
10
by: Noah Roberts | last post by:
I understand that different integer types might have time penalties because of word boundaries. Where can I get information clarifying this topic? A quick google didn't turn up much for me...nice...
4
by: jehugaleahsa | last post by:
Hello: When developing data structures for C#, there is an obvious performance hit when utilizing primitive types. For instance, a recent hash table implementation I wrote works exceedingly fast...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.