Good work. Nice to see I'm not the only one interested in factor finding... Just a few things though:
1. Your using Integers so your already restricted to the number of digits you can use. Use System.Numerics.BigInteger instead.
2. You test every number between 2 and the number entered. When you think about it though, no number bigger than 50 will divide evenly into 100. But more importantly, no two numbers larger than the square root of any number can multiply together to give a number smaller than the number. In your example you should use the Math.Sqrt function. Unfortunately, BigInteger doesn't provide that.
3. When displaying the results, I'd display as equations so that you get
1 * 100
2 * 50
4 * 25
5 * 20
10 * 10
instead of just
1
2
4
5
10
20
25
50
4. If you only want numeric entries, why not use a numeric up down instead of a text box? With numeric up downs you can only enter numbers and even use the up down arrows as well. Except, if your using BigInteger, you'd have to make your own numeric up down as the standard one only returns decimal numbers and, consequently, has a maximum limit.
5. If you start using BigInteger, you'll want a way to cancel factor finding so you'll need to use another thread that listens for the cancel.
6. Finally, if you really want a good, fast factor finder, use a faster language like C++
Here's my attempt at a factor finder:
http://www.mediafire.com/?4c2tllg6lkvllbd
Also, here's a link to a website with factor finding stuff. It even has this cool game on it.
http://factorfinder.tk/
1. Your using Integers so your already restricted to the number of digits you can use. Use System.Numerics.BigInteger instead.
2. You test every number between 2 and the number entered. When you think about it though, no number bigger than 50 will divide evenly into 100. But more importantly, no two numbers larger than the square root of any number can multiply together to give a number smaller than the number. In your example you should use the Math.Sqrt function. Unfortunately, BigInteger doesn't provide that.
3. When displaying the results, I'd display as equations so that you get
1 * 100
2 * 50
4 * 25
5 * 20
10 * 10
instead of just
1
2
4
5
10
20
25
50
4. If you only want numeric entries, why not use a numeric up down instead of a text box? With numeric up downs you can only enter numbers and even use the up down arrows as well. Except, if your using BigInteger, you'd have to make your own numeric up down as the standard one only returns decimal numbers and, consequently, has a maximum limit.
5. If you start using BigInteger, you'll want a way to cancel factor finding so you'll need to use another thread that listens for the cancel.
6. Finally, if you really want a good, fast factor finder, use a faster language like C++
Here's my attempt at a factor finder:
http://www.mediafire.com/?4c2tllg6lkvllbd
Also, here's a link to a website with factor finding stuff. It even has this cool game on it.
http://factorfinder.tk/