Need C# help

Please confine these topics to things that would be of general interest to those who are interested in FAH which don't fall into any other category.

Moderator: Site Moderators

Post Reply
batman113
Posts: 44
Joined: Fri Nov 07, 2008 9:46 pm
Hardware configuration: WILKINS00:Intel Core2 Quad Q6600 2.4GHz 8GB PC6400/800MHz RAM Asus P5N32 Mobo Western Digital 160GB HD PNY GeForce 8800GT 256MB GDDR3
WILKINS02-Celeron D 2.8 GHz 2GB Corsair Value Select 80GB WD HD ATI RADEON HD 3450 Foxconn Mobo
WILKINS03(laptop)-Intel Core 2 Duo T7500 2.2GHz 2GB DDR2 RAM 160GB HD
RADIOSERVER-Pentium 4 3.2GHz 512mb DDR RAM 120GB HD
Contact:

Need C# help

Post by batman113 »

Hi,
Im making a prime number checker and i need to be able to check if a number is an integer or not. Has anyone got any ideas how?
Thanks
uncle_fungus
Site Admin
Posts: 1288
Joined: Fri Nov 30, 2007 9:37 am
Location: Oxfordshire, UK

Re: Need C# help

Post by uncle_fungus »

Math.Floor(x) == x

Returns true if x is an int, false otherwise.

Google is your friend ;)
batman113
Posts: 44
Joined: Fri Nov 07, 2008 9:46 pm
Hardware configuration: WILKINS00:Intel Core2 Quad Q6600 2.4GHz 8GB PC6400/800MHz RAM Asus P5N32 Mobo Western Digital 160GB HD PNY GeForce 8800GT 256MB GDDR3
WILKINS02-Celeron D 2.8 GHz 2GB Corsair Value Select 80GB WD HD ATI RADEON HD 3450 Foxconn Mobo
WILKINS03(laptop)-Intel Core 2 Duo T7500 2.2GHz 2GB DDR2 RAM 160GB HD
RADIOSERVER-Pentium 4 3.2GHz 512mb DDR RAM 120GB HD
Contact:

Re: Need C# help

Post by batman113 »

Thanks
i searched for ages and couldnt find what i was looking for but thanks!
Post Reply