473,407 Members | 2,312 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,407 software developers and data experts.

Data types

I'm really curious on something. I just jumped to the 2005 platform and I
noticed something using the code snipplets. I have up to now been declaring
my variables and properties with Int64, Int32, Int16. However, I notice that
the code snipplets do it as Double, Integer, and Short. What the heck is the
difference? Is one way the better ".NET" way than the other? Also which is
better to use: Date or DateTime?

TIA
Steve
Feb 1 '06 #1
2 1026
Steve,

I wished there was a difference, but they stopped with it. An Integer at the
moment the same as an Int32. If they had not don that, than the integer
could have been on a 64 bits computer a Int64 and been processed something
quicker on a 64bit system, without code change.

Int32 could than be used to describe a real Int32, by instance to be used in
an API and Integer as the most efficient (processing) value.

I use it however in that way. An Int32 in my programmes describes a real
Int32 and an Integer the most optimal to use value.

An int64 is a Long (Integer) while Short (Integer) is a 16Bit Value.

A Double is a 8 bytes double precision floating point value.

A date and datetime are the same, it holds forever a datetime value.
I use forever DateTime from which the date part is datetime.date

I hope this gives an idea.

Cor
Feb 1 '06 #2
"Steve Peterson" <sp*******@nospam.com> schrieb:
I'm really curious on something. I just jumped to the 2005 platform and I
noticed something using the code snipplets. I have up to now been
declaring my variables and properties with Int64, Int32, Int16. However, I
notice that the code snipplets do it as Double, Integer, and Short. What
the heck is the difference? Is one way the better ".NET" way than the
other? Also which is better to use: Date or DateTime?

'Byte', 'Short', 'Integer', etc. are just aliases for 'UInt8', 'Int16',
'Int32', etc. I suggest to use 'Integer', etc. because they seem more
natural in VB.NET. 'Date' is simply an alias for 'DateTime'. Note that the
type aliases are colored differently from the other types in the VS.NET
IDE's text editor.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 1 '06 #3

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

Similar topics

3
by: GGG | last post by:
I have a situation where at tool is passing me a large array of strings that I need to process in a particular type of data. Each item in the array gets to me as a pair of std::strings, basically,...
13
by: Shailesh Humbad | last post by:
I wrote a short page as a quick reference to c++ integer data types. Any feedback welcome: http://www.somacon.com/blog/page11.php
11
by: theshowmecanuck | last post by:
As a matter of academic interest only, is there a way to programmatically list the 'c' data types? I am not looking for detail, just if it is possible, and what function could be used to...
8
by: ramu | last post by:
Hi, I want to call a vc++ function from a c program on linux. So when I do this dosen't the VC++ datatypes differ with c datatypes. Because we don't have some vc++ data types in c. I have to...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
7
by: Arpan | last post by:
The .NET Framework 2.0 documentation states that An Object variable always holds a pointer to the data, never the data itself. Now w.r.t. the following ASP.NET code snippet, can someone please...
18
by: Joel Hedlund | last post by:
Hi! The question of type checking/enforcing has bothered me for a while, and since this newsgroup has a wealth of competence subscribed to it, I figured this would be a great way of learning...
3
by: psbasha | last post by:
Hi , When ever we read any data from file ,we read as a single line string ,and we convert the respective field data available in that string based on the data type ( say int,float ). ...
1
by: Alex | last post by:
Hi, I have three different data types coming out of my SQL tables that I need to align with my VB code and the data set properties. I'm getting an error message that reads "SQL exception...
0
by: Hags007 | last post by:
I have a XML file I am working with. This file has been created by hand and I now need to develop a PHP script that will create it in the same format. Here is what I have thus far: $query =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.