Data Types in C#

29 views
Skip to first unread message

Alex Gabriel

unread,
Mar 30, 2012, 1:30:59 PM3/30/12
to dotnetde...@googlegroups.com
I'm relatively new to C#, and have a question regarding use of data types. In the book I've been reading, it's indicated that data types such as int are simply references to corresponding .NET data types.

My question is whether there is any functional difference, when coding, between the two? Additionally, is there any performance improvement using the .NET types? I.e. Does the compilation into I'll happen any quicker, or is there any runtime speed improvement as a result of the choice of one or the other when I code?
Sent from my BlackBerry device on the Rogers Wireless Network

Reuben Bartolo

unread,
Apr 3, 2012, 7:12:05 AM4/3/12
to dotnetde...@googlegroups.com
C# (and all .Net languages, such as VB and F#), have common data types, which are compatable. So in reality, they are the same. For this reason, you should not worry about performance, since C# exposes its own representation of the Common Type System. Any code you write is always translated to IL, so there is no performance gain to be had.


Regards,
Reuben Bartolo
http://whatiseeinit.blogspot.com/ 


--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetde...@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopm...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Rene Felix Correa

unread,
May 15, 2012, 7:33:39 AM5/15/12
to dotnetde...@googlegroups.com
Alex,

look at this post  http://renefc3.wordpress.com/2012/03/27/diferenca-entre-uma-classe-e-um-structreference-type-vs-value-type/ (is in portuguese from brazil) for you translate and is easy to understand
--
Rene Felix Correa
Analista Desenvolvedor
http://renefc3.wordpress.com

bhagyashree meshram

unread,
May 16, 2012, 6:36:22 AM5/16/12
to dotnetde...@googlegroups.com
unable to u'stand.
Bhagyashree Meshram-Fulzele
System Analyst
Govt. Polytechnic, Gondia


nagesh govindu

unread,
May 18, 2012, 4:52:44 AM5/18/12
to dotnetde...@googlegroups.com
 HI,
There is no performance issue sure.Because all datatypes will be converted to base data type(It means system.type)

On Tue, May 15, 2012 at 5:03 PM, Rene Felix Correa <ren...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages