[Mono-list] Is it a bug?
Daniel Pecos
dani@netpecos.org
Thu, 15 Aug 2002 21:34:18 +0200
--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
En respuesta a Hans-J=FCrgen Sch=F6nig, que escribi=F3 sobre [Mono-list] Is=
it a bug?:
> using System;
....
>=20
> // Ausgeben einer komplexen Zahl
> public void PrintComplex()
> {
> Console.Write( x + " + " + y);
> }
>=20
....
>=20
> public class Demo
> {
> public static void Main()
> {
> Complex zahl1 =3D new Complex(10, 20);
> Complex zahl2 =3D new Complex(100, 200);
> Complex ergebnis =3D new Complex();
>=20
> ergebnis =3D zahl1 + zahl2;
> Console.WriteLine( ergebnis.PrintComplex() );
!!!!!
=20
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=3Dx + " + " + y;
return str;
}
=20
> }
> }
=20
Bye!
--=20
=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=
=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7
=B7 .--. _ =B7
=B7 |o_o | Daniel Pecos Mart=EDnez / \ =B7
=B7 |:_/ | IRC Name: zeyen | () | =B7
=B7 // \ \ | \_/ =B7
=B7 (| | ) Web: www.netpecos.org \ =B7
=B7 /'\_ _/`\ \ =B7
=B7 \___)=3D(___/ Linux User: #175518 debian =B7
=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=
=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7
10 IF "LAS RANAS"=3D"TIENEN PELO" THEN PRINT "Windows is good".
--bg08WKrSYDhXBjb5
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9XAI6LeSGvlt15W8RAiOPAJ0TMt2hWI1cMMoI/W0fRg1NPEudzQCdFXZY
uPUlyLjJ100OvdWqk3B7lYs=
=PkBQ
-----END PGP SIGNATURE-----
--bg08WKrSYDhXBjb5--