Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

C# Invoking Multiple Delegates

[es] :: .NET :: C# Invoking Multiple Delegates

[ Pregleda: 795 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

nenadnesta
Nenad Stojkovic
student

Član broj: 263759
Poruke: 23
*.3gnet.mts.telekom.rs.



Profil

icon C# Invoking Multiple Delegates03.07.2011. u 14:24 - pre 155 meseci
evo samo dela koda:
Code (csharp):

// displays a report by invoking all selected delegates
    public void DoReport(double units, UnitConversion conversions)
    {
        Console.WriteLine("\nCONVERSION REPORT\n");

        // 4.  invoke all delegates synchronously and in order
        conversions(units);

        Console.WriteLine();
    }

    static void Main()
    {
        MultipleDelegatesViaDelegates dels = new MultipleDelegatesViaDelegates();
       
        double units;
        int[] conversionTypes;

        dels.GetUserInput(out units, out conversionTypes);

        UnitConversion conversions = null;
           
        foreach (int conversionType in conversionTypes)
        {
            // 3. get delegate instances via factory method.
            conversions += dels.GetConversionMethod(conversionType);
        }

        dels.DoReport(units, conversions);

        Console.ReadLine();
    }
 

ako bi neko bio ljubazan da dopuni delove koda koji nedostaju da bi sve ovo valjano radilo,
bio bi mu veoma zahvalan i puno bi pomogao.




[Ovu poruku je menjao mmix dana 15.07.2011. u 09:08 GMT+1]
 
Odgovor na temu

[es] :: .NET :: C# Invoking Multiple Delegates

[ Pregleda: 795 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.