Autor Beitrag
FinalFantasy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 127

Windows XP
Delphi 5 Professional, Visual Studio 7 .NET (C#)
BeitragVerfasst: Mi 08.02.06 12:55 
Hi,

ich habe mir ein Enum gemacht, das ungefähr so aussieht:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
enum Operator {
  add = '+',
  sub = '-',
  div = '/',
  mul = '*'
}


Jetzt bekomme ich einen char, und möchte prüfen, ob der char IRGENDEIN Operator ist... also ob er in dem Enum vorkommt.
Geht das irgendwie, ohne alles einzeln abzuprüfen?
Xqgene
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 20



BeitragVerfasst: So 12.02.06 02:18 
--> .NET Doku --> Enum Structure --> die statische Methoden

_________________
There are only 10 types of people in the world:
Those who understand Binary and those who don`t.