変換前のプログラムを逆コンパイルしたコード
001 namespace ConsoleApplication1
002 {
003 internal class Class1
004 {
005
006 static Class1()
007 {
008 Class1.START = 2;
009 Class1.MAX = 10000;
010 }
011 public Class1()
012 {
013 }
014 private static bool CheckPrime(int Number)
015 {
016 foreach (int num1 in Class1.Primes)
017 {
018 int num2 = Number / num1;
019 if (Number == (num2 * num1))
020 {
021 return false;
022 }
023 }
024 return true;
025 }
026 [STAThread]
027 private static void Main(string[] args)
028 {
029 Class1.Primes = new ArrayList();
030 for (int num1 = Class1.START; num1 < Class1.MAX; num1++)
031 {
032 if (Class1.CheckPrime(num1))
033 {
034 Class1.SetPrime(num1);
035 Class1.ShowData(num1.ToString());
036 }
037 }
038 }
039 private static void SetPrime(int Number)
040 {
041 Class1.Primes.Add(Number);
042 }
043 private static void ShowData(string Number)
044 {
045 Console.Write(Number + ",");
046 }
047
048 private static int MAX;
049 private static ArrayList Primes;
050 private static int START;
051 }
052 }