d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > I'm So Confused About Certain Datatypes > C#
Prev12
Add Reply New Topic New Poll
Member
Posts: 5,880
Joined: Sep 8 2007
Gold: 17,541.00
Nov 19 2015 02:52pm
Quote (carteblanche @ 14 Aug 2015 13:44)
rule of thumbs:
if it's money, use decimal
if it's not money but uses decimal places, use double
if it's an integer value, use int
(personally i use long for ids, but dunno what the standard is for that.)

you almost never wanna use byte, ubyte, short, ushort, uint, etc. dont overanalyze. it's a very small part of programming. use the rule of thumb and move on. focus on other things.


I wouldn't necessarily say "you almost never wanna use..." because those data types do have their purposes. However, i would certainly agree that the mentioned data types are infrequent. I personally use the type "byte" as i do a lot of work with images and networking tools.

This post was edited by FDBtech on Nov 19 2015 02:53pm
Member
Posts: 31,523
Joined: Mar 31 2004
Gold: 6.57
Nov 19 2015 04:19pm
Quote (Minkomonster @ 16 Sep 2015 17:22)
Are you trolling? I hope you're trolling.


When you get into Pointers and memory allocation it was big thing awhile back its not that big deal any more.. but if your making certain programs for certain things you want something to run as fast as possible.. For example Auto Pilot on airplane.
Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll