SORU
28 AĞUSTOS 2009, Cuma


C negatif için pozitif bir sayı dönüştürmek#

Böyle negatif bir sayı dönüştürebilirsiniz:

int myInt = System.Math.Abs(-5);

Eşdeğer bir yöntem pozitif bir sayıyı negatif yapmak var mı?

Teşekkürler

CEVAP
28 AĞUSTOS 2009, Cuma


int myNegInt = System.Math.Abs(myNumber) * (-1);

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:
C#

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Bryan Smith

    Bryan Smith

    12 Mart 2006
  • MattSteffanina 2

    MattSteffani

    28 Kasım 2007
  • WK

    WK

    9 Ocak 2006