Autor Beitrag
tartare
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89

Win XP SP2, WIN Vista Home Professional
Delphi 7/2009, C#, C++(VS 2005 Express)
BeitragVerfasst: Mi 20.09.06 14:29 
Hallo, ich programmiere noch nicht lange mit c# und wollte mal wissen ob es so etwas wie "or" in delphi auch in c# gibt:

ausblenden Delphi-Quelltext
1:
if (a=3or (b=7then Anweisung;					


...aber halt in c#

danke im vorraus...
mfg tartare

_________________
Ich leb in meiner eigenen Welt, aber das is ok, da kennt man mich.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6386
Erhaltene Danke: 146

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.09.06 14:41 
ausblenden C#-Quelltext
1:
2:
3:
4:
if ((a==3) || (b==7))
{
  // Anweisung
}


Eine kleine Übersicht:

== Vergleich auf Gleichheit
!= Vergleich auf Ungleichheit
> Vergleich auf größer
< Vergleich auf kleiner
>= Vergleich auf größer oder gleich
<= Vergleich auf kleiner oder gleich

! nicht-Operator
&& und-Verknüpfung
|| oder-Verknüpfung
tartare Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89

Win XP SP2, WIN Vista Home Professional
Delphi 7/2009, C#, C++(VS 2005 Express)
BeitragVerfasst: Mi 20.09.06 14:47 
Danke für die schnelle Antwort!!!

_________________
Ich leb in meiner eigenen Welt, aber das is ok, da kennt man mich.