Autor Beitrag
IceWind007
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Mo 29.03.10 18:17 
Hallo,

ich habe ein Linearmaßstab von dem ich Zahlen bekommen
Die Zahlen gebe ich in einem Richtextbox aus.
Ich muss jetzt aber noch ein Wert dazu addieren 5 auf den X Wert.
X-Wert+5=X1-wert
Ich weis aber grade nicht wie das geht.
Hier der Code:

ausblenden C#-Quelltext
1:
2:
Coord coord = mc6.Position;
            richTextBox1.Text += string.Format("({0}, {1})\n", coord.x.ToString(), coord.y.ToString());


Wie muss ich das jetzt schreiben das er auf den X Wert der vom Zähler kommt 5 Adiert.
Danke im voraus.

Moderiert von user profile iconChristian S.: C#-Tags hinzugefügt
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mo 29.03.10 18:27 
Hallo,
ausblenden C#-Quelltext
1:
2:
Coord coord = mc6.Position; 
richTextBox1.Text += string.Format("({0}, {1})\n", (coord.x + 6).ToString(), coord.y.ToString());


Gruß

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
Greenberet
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 339
Erhaltene Danke: 20

Win 10
C# (VS 2012), C++ (VS 2012/GCC), PAWN(Notepad++), Java(NetBeans)
BeitragVerfasst: Mo 29.03.10 18:48 
das "toString()" kannst du dir übrigens sparen:

ausblenden C#-Quelltext
1:
2:
Coord coord = mc6.Position; 
richTextBox1.Text += string.Format("({0}, {1})\n", coord.x + 6, coord.y);
IceWind007 Threadstarter
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Mo 29.03.10 19:45 
Danke Danke.

Ich hätte aber noch eine Bitte.
Die Daten kommen als Polares koordinaten System.
Wie bekomme ich die X und y Werte in Kathesisches koordinatensystem.
Das wäre noch super wenn das mir einer erklären würde
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 29.03.10 19:56 
Hallo!

Bitte erstelle für eine neue Frage auch einen neuen Thread! Dann kannst Du den in der richtigen Sparte unterbringen und mit einem passenden Titel versehen. Danke!

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.