public enum MyType { Undef = 0, Type1 = 10, Type2 = 20, Type3 = 64 } // Variante 1 mit Parse string sType = "Type1"; MyType t = (MyType)Enum.Parse(typeof(MyType), sType); // Variante 2 mit TryParse MyType a; string sType = "Type1"; // Inhalt von string "sType" bestimmen und in MyType wandeln // Ergebnis in "a" ausgeben if (Enum.TryParse<MyType->(sType, out a)) { ... }
Kategorien
-
Neueste Beiträge
- [SAP] IDOC-Verarbeitung
- [SAP] Analyse der Performance von ABAP CDS Views
- [SAP] ABAP CDS Views und Verwendung von Annotations
- [SAP] Adobe Forms Administration
- [Raspberry Pi] ZigBee USB-Sticks im Vergleich
- [Raspberry Pi] ZigBee: zigbee2mqtt einrichten, mosquitto broker installieren
- [ABAP] Leistungstammsatz anlegen
- [ABAP] Leistungstammsatz lesen
- [Raspberry Pi] Betriebsystemfunktionen ausführen
- [SAP] Übersichten zum ABAP Programming Model