Autor Beitrag
blutengel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59

Win XP, WIN 7
VS#2008 Prof
BeitragVerfasst: So 09.01.11 00:53 
Hi!


Habe mit

ausblenden C#-Quelltext
1:
Point[] sinus = new Point[periodendauer_int];					




ein Point Array zum Zeichnen initalisiert. Jetzt möchte ich mittels if Abfrage jeweils den 2. Wert, also den Y-Wert abfragen ob der kleiner 1 ist.

Jetzt meine Frage:

Wie komme ich an den Wert heran um in in einer if abzufragen?


MFG

blutengel
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 09.01.11 01:05 
Wie wäre es mit der Eigenschaft Y von Point?
ausblenden C#-Quelltext
1:
sinus[i].Y					

Für diesen Beitrag haben gedankt: blutengel
blutengel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59

Win XP, WIN 7
VS#2008 Prof
BeitragVerfasst: So 09.01.11 01:17 
Danke scheint zu funktionieren!

Habe es jetzt so gemacht:


ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
 komp = sinus[zeit].Y;

                    if (komp < 2)
                    {
                       
                        sinus[zeit].Y = 3;
                    }
                    if (komp > 299)
                    {
                       
                        sinus[zeit].Y = 297;
                    }


oder kann ich sinus[zeit].Y direkt in die if packen???


MFG


blutengel
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: So 09.01.11 01:27 
user profile iconblutengel hat folgendes geschrieben Zum zitierten Posting springen:
oder kann ich sinus[zeit].Y direkt in die if packen???

Probier's doch aus :D