Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2004, 07:11 AM
Authorized User
 
Join Date: Jun 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default Int32 or Integer that is the question

This might seem a silly question but here goes anyway, which keyword of integer should I be using Int32 or Integer?

I know they are both 32 bit signed integers, but I thought that the Integer keyword was for backwards compatibility with VB6 and Int32 was the new keyword to use with VB.Net



Duncan
__________________
Duncan
 
Old April 19th, 2004, 01:35 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

"Integer" is the VB.net keyword for System.Int32. In C# it's "int". They amount to the same thing so it's really a matter of whether you want to use the same name (Int32) between the languages. If you code regularly in both, it could be helpful to use the .net CLR types so it's consistant and easy to switch back and forth. I can't say how many times I have typed "int intSomething" in VB only to eventually realize that not only are the name and keywords in the wrong order but the keyword isn't correct to begin with. If you standardize on the .net CLR types you'll at least eliminate that problem.

Peter
-------------------------
Work smarter, not harder
 
Old May 1st, 2004, 08:30 AM
Authorized User
 
Join Date: Jun 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Peter

When you say "it could be helpful to use the .net CLR types" which ones are you refering to "Int32" or "Integer"?



Duncan
 
Old May 1st, 2004, 08:40 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

"Integer" is VB.net

"Int32" is the CLR type.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Integer I/O in assembly kaycg BOOK: Professional Assembly Language 2 May 11th, 2007 05:00 AM
int && int32 angelboy C# 2005 2 March 13th, 2007 11:22 AM
testing integer rjonk XSLT 2 July 27th, 2006 03:11 PM
Integer Size Miquella C++ Programming 7 November 6th, 2005 10:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.