En respuesta a Hans-J�rgen Sch�nig, que escribi� sobre [Mono-list] Is it a bug?:
> using System;
 ....
> 
>        // Ausgeben einer komplexen Zahl
>        public void PrintComplex()
>        {
>                Console.Write( x + " + " + y);
>        }
> 
 ....
> 
> public class    Demo
> {
>        public static void Main()
>        {
>                Complex zahl1 = new Complex(10, 20);
>                Complex zahl2 = new Complex(100, 200);
>                Complex ergebnis = new Complex();
> 
>                ergebnis = zahl1 + zahl2;
>                Console.WriteLine( ergebnis.PrintComplex() );
                 !!!!!
                 
  Here, you're printing on the console the return of ergebnis.PrintComplex(),
  but it doesn't return anything (it also prints on the console)

  I don't know if it should get compiled with mcs, but you should fix
  your problem in this way:

        // Ausgeben einer komplexen Zahl
        public string PrintComplex()
        {
                string str=x + " + " + y;
                return str;
        }
 
>        }
> }
  
  Bye!

-- 
  �������������������������������������������������
  �     .--.                                 _    �
  �    |o_o |     Daniel Pecos Mart�nez    /   \  �
  �    |:_/ |     IRC Name: zeyen         |  () | �
  �   //   \ \                            |  \_/  �
  �  (|     | )   Web: www.netpecos.org    \      �
  � /'\_   _/`\                              \    �
  � \___)=(___/   Linux User: #175518     debian  �
  �������������������������������������������������

10 IF "LAS RANAS"="TIENEN PELO" THEN PRINT "Windows is good".

Attachment: msg02504/pgp00000.pgp
Description: PGP signature

Reply via email to