C sharp basics
servus.
folgendes Problem kann im Visual Studio mit float keine Gleitkommazahlen darstellen.
Erste Dezimalstelle rechts vom punkt wird sofort rot unterstrichen (Ganzzahlen funktionieren)
es kommt ein Fehler mit (Datentyp ist Double zugeordnet).
bitte um Lösungsvorschläge.
folgendes Problem kann im Visual Studio mit float keine Gleitkommazahlen darstellen.
Erste Dezimalstelle rechts vom punkt wird sofort rot unterstrichen (Ganzzahlen funktionieren)
es kommt ein Fehler mit (Datentyp ist Double zugeordnet).
bitte um Lösungsvorschläge.
Please also mark the comments that contributed to the solution of the article
Content-Key: 499997
Url: https://administrator.de/contentid/499997
Printed on: May 11, 2024 at 11:05 o'clock
1 Comment
Moin,
Näääää ne
Gruß
Näääää ne
float f = 10.2F;
Float: It is 32-bit single-precision floating point type. It has 7 digit Precision. To initialize a float variable, use the suffix f or F. Like, float x = 3.5F;. If the suffix F or f will not use then it is treated as double.
https://www.geeksforgeeks.org/c-sharp-data-types/bitte um Lösungsvorschläge.
Nächstes mal erst mal bitte Google würgen, oder den Text in der Fehlermeldung lesen ...Gruß