I guess I might use delegates. But I'm not certain if I can apply for it. Sorry if the code is a mess.  I'm a beginner and am still learning.  For that reason, I need a little of help to improve this code. It's not finished.I'm creating a Math quiz system. And there are many questions as you will be able to see in it, they're so different and I have a difficult moment to create the classes.    private int[] Generate_Fraction(int li1, int ls1, int li2, int ls2)    {        int numerator = randomizer.Next(li1, ls1);        int denominator = randomizer.Next(li2, ls2);        int[] fraction = new int[2];        fraction[0] = numerator;        fraction[1] = denominator;        return fraction;    }    // Decimals    private double[] GeneratePattern5(double[][] limits)    {        double[] decimals = new double[limits.Length];        for (int i = 0; i < limits.Length; i++)        {            bool flag;            double decTemp;            do            {                flag = false;                decTemp = GetDoubleBetween(limits[i][0], limits[i][1], (int)limits[i][2]);                if (Exists(decimals, decTemp, i))                {                    flag = true;                }            } while (flag);            decimals[i] = decTemp;        }        return decimals;    }    // Fractions like: 6/60    private int[][] GeneratePattern7(int[][] arrayLimits)    {        int[][] fractions = new int[arrayLimits.Length][];        for (int i = 0; i < arrayLimits.Length; i++)        {            bool flag;            int[] fracTemp = new int[2];            do            {                flag = false;                fracTemp = Generate_Fraction(arrayLimits[i][0], arrayLimits[i][1], arrayLimits[i][2], arrayLimits[i][3]);                fracTemp[1] *= fracTemp[0];                if (Exists(fractions, fracTemp, i))                {                    flag = true;                }            } while (flag);            fractions[i] = fracTemp;        }        return fractions;    }
Can I improve this code using delegates?
c#;beginner;wpf