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
- [ABAP] Verschieben von Nodes per Drag & Drop innerhalb einer Baumansicht (CL_COLUMN_TREE_MODEL)
- [SAP] Screen Personas
- Weltall / Raumfahrt
- [CDS-Views] Virtuelle Elemente: Aufruf von ABAP-Coding aus CDS-Views heraus
- [CDS-Views] CDS: Verwendung von Operanden und Expressions
- Steuer
- [ABAP] Beliebiges PDF aus SAP heraus drucken
- [ABAP] Versand von Emails auf Basis von CDS-Views
- Volkswirtschaft
- [SAP] Entwicklung SAP ABAP Programming Model