elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP) (Moderador: kub0x)
| | | |-+  Me pueden dar consejos para optimizar mi code? C#
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Me pueden dar consejos para optimizar mi code? C#  (Leído 3,655 veces)
Edu


Desconectado Desconectado

Mensajes: 1.082


Ex XXX-ZERO-XXX


Ver Perfil
Me pueden dar consejos para optimizar mi code? C#
« en: 22 Diciembre 2010, 20:41 pm »

Bueno resulta q logre hacer un proyecto q tanto queria, ahora quiero ver si puedo optimizarlo y quede mas corto y mas profesional, quiero ver si me ayudan con eso, critiquen todo lo q sea, lo mas minimo critiquen.
Bueno aca dejo, es largo perdonen:

Código
  1.  
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.    class Program
  10.    {
  11.        private static int[] Mazo = new int[21];
  12.        private static int[] SegundaR = new int[21];
  13.        private static int[] TerceraR = new int[21];
  14.        private static int[] CuartaR = new int[21];
  15.        private static int[] QuintaR = new int[21];
  16.        private static int[] Pozo1 = new int[7];
  17.        private static int[] Pozo2 = new int[7];
  18.        private static int[] Pozo3 = new int[7];
  19.  
  20.  
  21.        private static int opc;
  22.        private static int j = 0;
  23.        private static int g = 0;
  24.        private static int h = 0;
  25.        private static int f = 20;
  26.        private static int k = 0;
  27.  
  28.  
  29.        public static void Mostrar2(int[] mazito1, int[] mazito2, int[] mazito3, int nummazo)
  30.  
  31.        {
  32.  
  33.            int warning = 0;
  34.            do
  35.            {
  36.                Console.Clear();
  37.                Console.WriteLine();
  38.                Console.WriteLine("  - Elegiste el pozo numero {0}", nummazo);
  39.                Console.WriteLine();
  40.                try
  41.                {
  42.                    Console.WriteLine("-  POZO 1  -");
  43.                    Console.WriteLine();
  44.                    for (int i = 0; i < mazito1.Length; i++)
  45.                    {
  46.                        Console.WriteLine("Carta Nº: {0}", mazito1[i]);
  47.  
  48.  
  49.                    }
  50.                    Console.WriteLine(); Console.WriteLine();
  51.                    Console.WriteLine("-  POZO 2  -");
  52.                    Console.WriteLine();
  53.                    for (int i = 0; i < mazito2.Length; i++)
  54.                    {
  55.                        Console.WriteLine("Carta Nº: {0}", mazito2[i]);
  56.  
  57.  
  58.                    }
  59.  
  60.                    Console.WriteLine(); Console.WriteLine();
  61.                    Console.WriteLine("-  POZO 3  -");
  62.                    Console.WriteLine();
  63.                    for (int i = 0; i < mazito3.Length; i++)
  64.                    {
  65.                        Console.WriteLine("Carta Nº: {0}", mazito3[i]);
  66.  
  67.  
  68.                    }
  69.  
  70.                    Console.WriteLine(); Console.WriteLine();
  71.  
  72.                    Console.Write("  - Vuelve a escribir el pozo donde se encuentra tu numero: ");
  73.  
  74.                    opc = int.Parse(Console.ReadLine());
  75.  
  76.                    if ((opc != 1) && (opc != 2) && (opc != 3))
  77.                    {
  78.                        Console.Clear();
  79.                        Console.WriteLine();
  80.                        Console.WriteLine("  - NUMERO INCORRECTO, SON 3 POZOS SOLAMENTE xD");
  81.                        warning = 0;
  82.                        Console.WriteLine();
  83.                        Console.WriteLine(" Presione una tecla para volver..");
  84.                        Console.ReadKey();
  85.                    }
  86.                    else warning = 1;
  87.  
  88.                }
  89.                catch
  90.                { }
  91.            } while (warning == 0);
  92.  
  93.  
  94.            switch (opc)
  95.            {
  96.                case 1:
  97.                    f = 20;
  98.                    h = 0;
  99.                    g = 0;
  100.                    k = 0;
  101.  
  102.                    for (int i = 0; i < mazito2.Length; i++)
  103.                    {
  104.                        CuartaR[k] = mazito2[i];
  105.                        k++;
  106.                    }
  107.  
  108.                    for (int i = 0; i < mazito1.Length; i++)
  109.                    {
  110.                        CuartaR[k] = mazito1[i];
  111.                        k++;
  112.                    }
  113.  
  114.                    for (int i = 0; i < mazito3.Length; i++)
  115.                    {
  116.                        CuartaR[k] = mazito3[i];
  117.                        k++;
  118.                    }
  119.  
  120.                    for (int i = 0; i < 7; i++)
  121.                    {
  122.  
  123.                        Pozo1[i] = CuartaR[f];
  124.                        f--;
  125.  
  126.                        Pozo2[g] = CuartaR[f];
  127.                        f--;
  128.                        Pozo3[h] = CuartaR[f];
  129.  
  130.                        g++;
  131.                        h++;
  132.                        f--;
  133.  
  134.  
  135.                    }
  136.  
  137.  
  138.                    Console.Clear();
  139.                    Console.WriteLine("Elegiste la carta Nº {0}, no?", CuartaR[10]);
  140.                    Console.Read();
  141.                    Console.WriteLine("Lo sabia, soy un genio!!!!!!");
  142.  
  143.  
  144.                    break;
  145.  
  146.  
  147.                case 2:
  148.  
  149.                    f = 20;
  150.                    h = 0;
  151.                    g = 0;
  152.                    k = 0;
  153.  
  154.                    for (int i = 0; i < mazito3.Length; i++)
  155.                    {
  156.                        CuartaR[k] = mazito3[i];
  157.                        k++;
  158.                    }
  159.  
  160.  
  161.  
  162.  
  163.                    for (int i = 0; i < mazito2.Length; i++)
  164.                    {
  165.                        CuartaR[k] = mazito2[i];
  166.                        k++;
  167.                    }
  168.  
  169.  
  170.  
  171.  
  172.                    for (int i = 0; i < mazito1.Length; i++)
  173.                    {
  174.                        CuartaR[k] = mazito1[i];
  175.                        k++;
  176.                    }
  177.  
  178.  
  179.                    for (int i = 0; i < 7; i++)
  180.                    {
  181.  
  182.                        Pozo1[i] = CuartaR[f];
  183.                        f--;
  184.  
  185.                        Pozo2[g] = CuartaR[f];
  186.                        f--;
  187.                        Pozo3[h] = CuartaR[f];
  188.  
  189.                        g++;
  190.                        h++;
  191.                        f--;
  192.  
  193.  
  194.                    }
  195.                    Console.Clear();
  196.                    Console.WriteLine("Elegiste la carta Nº {0}, no?", CuartaR[10]);
  197.                    Console.Read();
  198.                    Console.WriteLine("Lo sabia, soy un genio!!!!!!");
  199.                    break;
  200.  
  201.                case 3:
  202.                    f = 20;
  203.                    h = 0;
  204.                    g = 0;
  205.                    k = 0;
  206.  
  207.                    for (int i = 0; i < mazito1.Length; i++)
  208.                    {
  209.                        CuartaR[k] = mazito1[i];
  210.                        k++;
  211.                    }
  212.  
  213.  
  214.                    for (int i = 0; i < mazito3.Length; i++)
  215.                    {
  216.                        CuartaR[k] = mazito3[i];
  217.                        k++;
  218.                    }
  219.  
  220.                    for (int i = 0; i < mazito2.Length; i++)
  221.                    {
  222.                        CuartaR[k] = mazito2[i];
  223.                        k++;
  224.                    }
  225.  
  226.                    for (int i = 0; i < 7; i++)
  227.                    {
  228.  
  229.                        Pozo1[i] = CuartaR[f];
  230.                        f--;
  231.  
  232.                        Pozo2[g] = CuartaR[f];
  233.                        f--;
  234.                        Pozo3[h] = CuartaR[f];
  235.  
  236.                        g++;
  237.                        h++;
  238.                        f--;
  239.  
  240.  
  241.                    }
  242.  
  243.                    Console.Clear();
  244.                    Console.WriteLine("Elegiste la carta Nº {0}, no?", CuartaR[10]);
  245.                    Console.Read();
  246.                    Console.WriteLine("Lo sabia, soy un genio!!!!!!");
  247.                    break;
  248.  
  249.            }
  250.  
  251.        }
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.        public static void Mostrar(int[] pozito1, int[] pozito2, int[] pozito3, int numpozo)
  266.        {
  267.  
  268.            int mistake = 0;
  269.            do
  270.            {
  271.                Console.Clear();
  272.                Console.WriteLine();
  273.                Console.WriteLine("  - Elegiste el pozo numero {0}", numpozo);
  274.                Console.WriteLine();
  275.                try
  276.                {
  277.                    Console.WriteLine("-  POZO 1  -");
  278.                    Console.WriteLine();
  279.                    for (int i = 0; i < pozito1.Length; i++)
  280.                    {
  281.                        Console.WriteLine("Carta Nº: {0}", pozito1[i]);
  282.  
  283.  
  284.                    }
  285.                    Console.WriteLine(); Console.WriteLine();
  286.                    Console.WriteLine("-  POZO 2  -");
  287.                    Console.WriteLine();
  288.                    for (int i = 0; i < pozito2.Length; i++)
  289.                    {
  290.                        Console.WriteLine("Carta Nº: {0}", pozito2[i]);
  291.  
  292.  
  293.                    }
  294.  
  295.                    Console.WriteLine(); Console.WriteLine();
  296.                    Console.WriteLine("-  POZO 3  -");
  297.                    Console.WriteLine();
  298.                    for (int i = 0; i < pozito3.Length; i++)
  299.                    {
  300.                        Console.WriteLine("Carta Nº: {0}", pozito3[i]);
  301.  
  302.  
  303.                    }
  304.  
  305.                    Console.WriteLine(); Console.WriteLine();
  306.  
  307.                    Console.Write("  - Vuelve a escribir el pozo donde se encuentra tu numero: ");
  308.  
  309.                    opc = int.Parse(Console.ReadLine());
  310.  
  311.                    if ((opc != 1) && (opc != 2) && (opc != 3))
  312.                    {
  313.                        Console.Clear();
  314.                        Console.WriteLine();
  315.                        Console.WriteLine("  - NUMERO INCORRECTO, SON 3 POZOS SOLAMENTE xD");
  316.                        mistake = 0;
  317.                        Console.WriteLine();
  318.                        Console.WriteLine(" Presione una tecla para volver..");
  319.                        Console.ReadKey();
  320.                    }
  321.                    else mistake = 1;
  322.  
  323.                }
  324.                catch
  325.                { }
  326.            } while (mistake == 0);
  327.  
  328.  
  329.            switch (opc)
  330.            {
  331.                case 1:
  332.  
  333.                    f = 20;
  334.                    h = 0;
  335.                    g = 0;
  336.                    j = 0;
  337.  
  338.                    for (int i = 0; i < pozito2.Length; i++)
  339.                    {
  340.                        TerceraR[j] = pozito2[i];
  341.                        j++;
  342.                    }
  343.  
  344.                    for (int i = 0; i < pozito1.Length; i++)
  345.                    {
  346.                        TerceraR[j] = pozito1[i];
  347.                        j++;
  348.                    }
  349.  
  350.                    for (int i = 0; i < pozito3.Length; i++)
  351.                    {
  352.                        TerceraR[j] = pozito3[i];
  353.                        j++;
  354.                    }
  355.  
  356.                    for (int i = 0; i < 7; i++)
  357.                    {
  358.  
  359.                        Pozo1[i] = TerceraR[f];
  360.                        f--;
  361.  
  362.                        Pozo2[g] = TerceraR[f];
  363.                        f--;
  364.                        Pozo3[h] = TerceraR[f];
  365.  
  366.                        g++;
  367.                        h++;
  368.                        f--;
  369.  
  370.  
  371.                    }
  372.  
  373.  
  374.  
  375.  
  376.                    Mostrar2(Pozo1, Pozo2, Pozo3, 1);
  377.  
  378.                    break;
  379.  
  380.  
  381.                case 2:
  382.                    f = 20;
  383.                    h = 0;
  384.                    g = 0;
  385.                    j = 0;
  386.  
  387.                    for (int i = 0; i < pozito3.Length; i++)
  388.                    {
  389.                        TerceraR[j] = pozito3[i];
  390.                        j++;
  391.                    }
  392.  
  393.  
  394.  
  395.  
  396.                    for (int i = 0; i < pozito2.Length; i++)
  397.                    {
  398.                        TerceraR[j] = pozito2[i];
  399.                        j++;
  400.                    }
  401.  
  402.  
  403.  
  404.  
  405.                    for (int i = 0; i < pozito1.Length; i++)
  406.                    {
  407.                        TerceraR[j] = pozito1[i];
  408.                        j++;
  409.                    }
  410.  
  411.  
  412.                    for (int i = 0; i < 7; i++)
  413.                    {
  414.                        Pozo1[i] = TerceraR[f];
  415.                        f--;
  416.                        Pozo2[g] = TerceraR[f];
  417.                        f--;
  418.                        Pozo3[h] = TerceraR[f];
  419.  
  420.  
  421.                        g++;
  422.                        h++;
  423.                        f--;
  424.  
  425.  
  426.  
  427.  
  428.                    }
  429.  
  430.  
  431.  
  432.                    Mostrar2(Pozo1, Pozo2, Pozo3, 2);
  433.                    break;
  434.  
  435.                case 3:
  436.  
  437.  
  438.                    f = 20;
  439.                    h = 0;
  440.                    g = 0;
  441.                    j = 0;
  442.  
  443.  
  444.                    for (int i = 0; i < pozito1.Length; i++)
  445.                    {
  446.                        TerceraR[j] = pozito1[i];
  447.                        j++;
  448.                    }
  449.  
  450.  
  451.                    for (int i = 0; i < pozito3.Length; i++)
  452.                    {
  453.                        TerceraR[j] = pozito3[i];
  454.                        j++;
  455.                    }
  456.  
  457.                    for (int i = 0; i < pozito2.Length; i++)
  458.                    {
  459.                        TerceraR[j] = pozito2[i];
  460.                        j++;
  461.                    }
  462.  
  463.                    for (int i = 0; i < 7; i++)
  464.                    {
  465.                        Pozo1[i] = TerceraR[f];
  466.                        f--;
  467.  
  468.                        Pozo2[g] = TerceraR[f];
  469.                        f--;
  470.                        Pozo3[h] = TerceraR[f];
  471.  
  472.                        g++;
  473.                        h++;
  474.                        f--;
  475.  
  476.  
  477.                    }
  478.  
  479.                    Mostrar2(Pozo1, Pozo2, Pozo3, 3);
  480.                    break;
  481.  
  482.            }
  483.  
  484.        }
  485.  
  486.        public static bool NumExists(int Num, int MaxPos)
  487.        {
  488.            bool resultado = false;
  489.            for (int i = 0; i < MaxPos; i++)
  490.                if (Mazo[i] == Num)
  491.                {
  492.                    resultado = true;
  493.                    break;
  494.                }
  495.            return resultado;
  496.        }
  497.  
  498.  
  499.  
  500.        public static void RandomNumbers()
  501.        {
  502.            Random Rnd = new Random(unchecked((int)DateTime.Now.Ticks));
  503.            for (int i = 0; i < Mazo.Length; i++)
  504.                do
  505.                {
  506.                    Mazo[i] = Rnd.Next(1,22);
  507.                } while (NumExists(Mazo[i], i) == true);
  508.            Rnd = null;
  509.        }
  510.  
  511.  
  512.  
  513.  
  514.        static void Main(string[] args)
  515.        {
  516.            Console.BackgroundColor = ConsoleColor.Black;
  517.            Console.ForegroundColor = ConsoleColor.Green;
  518.            Console.Title = "Adivinador";
  519.            Console.WindowHeight = 40;
  520.            Console.WindowWidth = 90;
  521.  
  522.            int error = 0;
  523.  
  524.            do
  525.            {
  526.  
  527.            RandomNumbers();
  528.  
  529.                Console.Clear();
  530.                Console.WriteLine();
  531.                Console.WriteLine("  - Se han repartido las cartas, piensa en una y recuerdala que tratare de adivinarla");
  532.                Console.WriteLine(); Console.WriteLine();
  533.                Console.WriteLine("-  POZO 1  -");
  534.                Console.WriteLine();
  535.  
  536.                try
  537.                {
  538.                    for (int i = 0; i < 7; i++)
  539.                        Console.WriteLine("Carta Nº: {0}", Mazo[i]);
  540.                    Console.WriteLine(); Console.WriteLine();
  541.                    Console.WriteLine("-  POZO 2  -");
  542.                    Console.WriteLine();
  543.  
  544.                    for (int i = 7; i < 14; i++)
  545.                        Console.WriteLine("Carta Nº: {0}", Mazo[i]);
  546.                    Console.WriteLine(); Console.WriteLine();
  547.                    Console.WriteLine("-  POZO 3  -");
  548.                    Console.WriteLine();
  549.  
  550.                    for (int i = 14; i < 21; i++)
  551.                        Console.WriteLine("Carta Nº: {0}", Mazo[i]);
  552.                    Console.WriteLine(); Console.WriteLine();
  553.  
  554.                    Console.Write("  - Tu carta elegida esta en el pozo numero: ");
  555.  
  556.                    int opc = int.Parse(Console.ReadLine());
  557.                    error = 1;
  558.  
  559.  
  560.                    switch (opc)
  561.                    {
  562.                        case 1:
  563.  
  564.                            f = 20;
  565.                            h = 0;
  566.                            g = 0;
  567.                            j = 0;
  568.  
  569.                            for (int i = 7; i < 14; i++)
  570.                            {
  571.                                SegundaR[j] = Mazo[i];
  572.                                j++;
  573.                            }
  574.  
  575.                            for (int i = 0; i < 7; i++)
  576.                            {
  577.                                SegundaR[j] = Mazo[i];
  578.                                j++;
  579.                            }
  580.  
  581.                            for (int i = 14; i < 21; i++)
  582.                            {
  583.                                SegundaR[j] = Mazo[i];
  584.                                j++;
  585.                            }
  586.  
  587.                            for (int i = 0; i < 7; i++)
  588.                            {
  589.  
  590.                                Pozo1[i] = SegundaR[f];
  591.                                f--;
  592.  
  593.                                Pozo2[g] = SegundaR[f];
  594.                                f--;
  595.                                Pozo3[h] = SegundaR[f];
  596.  
  597.                                g++;
  598.                                h++;
  599.                                f--;
  600.  
  601.  
  602.                            }
  603.  
  604.  
  605.  
  606.  
  607.                            Mostrar(Pozo1, Pozo2, Pozo3, 1);
  608.  
  609.                            break;
  610.  
  611.  
  612.                        case 2:
  613.                            f = 20;
  614.                            h = 0;
  615.                            g = 0;
  616.                            j = 0;
  617.  
  618.                            for (int i = 14; i < 21; i++)
  619.                            {
  620.                                SegundaR[j] = Mazo[i];
  621.                                j++;
  622.                            }
  623.  
  624.  
  625.  
  626.  
  627.                            for (int i = 7; i < 14; i++)
  628.                            {
  629.                                SegundaR[j] = Mazo[i];
  630.                                j++;
  631.                            }
  632.  
  633.  
  634.  
  635.  
  636.                            for (int i = 0; i < 7; i++)
  637.                            {
  638.                                SegundaR[j] = Mazo[i];
  639.                                j++;
  640.                            }
  641.  
  642.  
  643.                            for (int i = 0; i < 7; i++)
  644.                            {
  645.                                Pozo1[i] = SegundaR[f];
  646.                                f--;
  647.                                Pozo2[g] = SegundaR[f];
  648.                                f--;
  649.                                Pozo3[h] = SegundaR[f];
  650.  
  651.  
  652.                                g++;
  653.                                h++;
  654.                                f--;
  655.  
  656.  
  657.  
  658.  
  659.                            }
  660.  
  661.  
  662.  
  663.                            Mostrar(Pozo1, Pozo2, Pozo3, 2);
  664.                            break;
  665.  
  666.                        case 3:
  667.  
  668.  
  669.                            f = 20;
  670.                            h = 0;
  671.                            g = 0;
  672.                            j = 0;
  673.  
  674.  
  675.                            for (int i = 0; i < 7; i++)
  676.                            {
  677.                                SegundaR[j] = Mazo[i];
  678.                                j++;
  679.                            }
  680.  
  681.  
  682.                            for (int i = 14; i < 21; i++)
  683.                            {
  684.                                SegundaR[j] = Mazo[i];
  685.                                j++;
  686.                            }
  687.  
  688.                            for (int i = 7; i < 14; i++)
  689.                            {
  690.                                SegundaR[j] = Mazo[i];
  691.                                j++;
  692.                            }
  693.  
  694.                            for (int i = 0; i < 7; i++)
  695.                            {
  696.                                Pozo1[i] = SegundaR[f];
  697.                                f--;
  698.  
  699.                                Pozo2[g] = SegundaR[f];
  700.                                f--;
  701.                                Pozo3[h] = SegundaR[f];
  702.  
  703.                                g++;
  704.                                h++;
  705.                                f--;
  706.  
  707.  
  708.                            }
  709.  
  710.                            Mostrar(Pozo1, Pozo2, Pozo3, 3);
  711.                            break;
  712.  
  713.                        default:
  714.                            Console.Clear();
  715.                            Console.WriteLine();
  716.                            Console.WriteLine("  - NUMERO INCORRECTO, SON 3 POZOS SOLAMENTE xD");
  717.                            error = 0;
  718.                            Console.WriteLine();
  719.                            Console.WriteLine(" Presione una tecla para volver..");
  720.                            break;
  721.                    }
  722.                    Console.ReadKey();
  723.  
  724.  
  725.                }
  726.                catch
  727.                { }
  728.                } while (error == 0);
  729.  
  730.  
  731.  
  732.  
  733.        }
  734.    }
  735. }
  736.  
  737.  


En línea

[D4N93R]
Wiki

Desconectado Desconectado

Mensajes: 1.646


My software never has bugs. Its just features!


Ver Perfil WWW
Re: Me pueden dar consejos para optimizar mi code? C#
« Respuesta #1 en: 22 Diciembre 2010, 21:32 pm »

Por encima puedo decirte que estás programando en el Program.cs, por qué no creas clases y las usas?


En línea

Edu


Desconectado Desconectado

Mensajes: 1.082


Ex XXX-ZERO-XXX


Ver Perfil
Re: Me pueden dar consejos para optimizar mi code? C#
« Respuesta #2 en: 22 Diciembre 2010, 22:18 pm »

Gracias, y que resolveria con eso aparte de mejor lectura? lo de las variables statics admito q las puse asi porq me pedia el compilador pero no entendia porq :S y creo q si hacia otras cosas como dices no tenia q ponerlas estaticas
En línea

[D4N93R]
Wiki

Desconectado Desconectado

Mensajes: 1.646


My software never has bugs. Its just features!


Ver Perfil WWW
Re: Me pueden dar consejos para optimizar mi code? C#
« Respuesta #3 en: 22 Diciembre 2010, 22:48 pm »

Si bueno, puedes tener una clase Juego, una clase mazo, un Enum para las cartas, etc.

De esta forma no solo mejoras la lectura del código, sino que queda mucho más escalable y mantenible a largo plazo.

Sobre los statics: Como puedes ver estás progrando dentro de una clase llamada Program la cual tiene el método estático Main. Pues como estás en un contexto estático, todas las referencias que uses tienen que ser estáticas.
En línea

Edu


Desconectado Desconectado

Mensajes: 1.082


Ex XXX-ZERO-XXX


Ver Perfil
Re: Me pueden dar consejos para optimizar mi code? C#
« Respuesta #4 en: 23 Diciembre 2010, 12:50 pm »

Muchas gracias, me sirven todos los consejos ya q no quiero solo saber programar, sino hacerlo bien.
Asique podria hacer una clase JuegoApp q contendra solo el Main y de ahi llamar a metodos de otra clase, lo del Enum no lo entiendo para que pero gracias.
Y lo de que use 3 procedimientos para ir repartiendo las cartas, una parte en Main y el Mostrar y Mostrar2, no me dices nada? Se podria hacer en un procedimiento solo talvez?

Me sirven esos consejos ya que quiero saber como hacer mis codigos mas profesionalmente o mas generalizados, es decir, la forma en q declare las variables.. los nombres de las variables para los bucles ( por ejemplo.. todo el mundo usa i ) , como capturar los errores, si lo hice bien, si tuve q haber puesto el Finally en vez de Catch, todas esas boludeces xD
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
pueden darme algunos consejos para el maya8.5
Diseño Gráfico
drp 1 3,000 Último mensaje 23 Noviembre 2008, 10:27 am
por Sub_Cero
Programas para optimizar windows « 1 2 »
Windows
crazykenny 10 8,310 Último mensaje 13 Julio 2010, 23:38 pm
por Randomize
14 consejos para optimizar el SEO en el diseño de blogs
Noticias
putus 0 2,167 Último mensaje 16 Julio 2011, 19:01 pm
por putus
Cinco consejos para optimizar tu red WiFi
Noticias
wolfbcn 0 793 Último mensaje 16 Septiembre 2018, 02:34 am
por wolfbcn
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines