|
|
 |
Re: FN-FORUM: C# Help
date posted 8th February 2008 15:51
Hi,
If c# (which I don't know) is just like Java (which I do, I hope), then
The first=20
int.Parse(intCurrIndex.Text)
needs to be compared to something (0, probably)=20
and the "+" needs to be "&&"
So:
if (((int.Parse(intCurrIndex.Text ) !=3D 0) &&
(1 < int.Parse(intRecordCount.Text))))
Graham
> Hi,
>=20
> Im tinkering with a tutorial / sample code which was given in VB.Net, and=
i have converted into c#. However i keep getting an error with this code:
>=20
> if ((int.Parse(intCurrIndex.Text) + (1 < int.Parse(intRecordCount.Text)))=
)
> {
> intCurrIndex.Text =3D ((int.Parse(intCurrIndex.Text) + int.Pa=
rse(intPageSize.Text))).ToString();
> }
>=20
> The error says: Operator '+' cannot be applied to operands of type 'short=
' and 'bool'
>=20
> Can anyone help me format / rectify this.
>=20
> Thanks.
>=20
> Regards
> Phill Healey
> Munklefish
> Po Box 70
> Manchester
> M34 3SQ
> T: 0161 408 4759
> =20
> =EF=80=A0=EF=81=90 Please consider the environment before printing.
>=20
>=20
--=20
Graham Stark, Virtual Worlds, http://www.virtual-worlds.biz
Phone (+44) 01908 618239 Mobile (+44) 07952633185 Skype graham_k_stark
|
 |
|