KGy SOFT

EnumFormattingOptions Enumeration

KGy SOFT Core Libraries Help

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public enum EnumFormattingOptions
Members

  Member nameValueDescription
Auto0 Provides similar formatting as the Enum.ToString method, though result is not guaranteed to be exactly the same if there are more defined names for the same value. The produced result will always be parseable by the System.Enum.Parse(Type, string) method as long as used separator is the comma character.
NonFlags1 The enum value is forced to be treated as a non-flags value. If there is no defined name for the current value, then a number is returned. This result is always parseable by the System.Enum.Parse(Type, string) method.
DistinctFlags2 The result will contain only those names, which are powers of 2 (single bits). Missing names will be substituted by integers. Result will not be parseable by the System.Enum.Parse(Type, string) method if the string contains a non-standalone number. To parse such a result the Enum<TEnum>.Parse and Enum<TEnum>.TryParse overloads can be used.
CompoundFlagsOrNumber3 The result can contain either defined names (including compound ones, which do not represent single bits) or a single numeric value. This behavior is similar to the Enum.ToString method for a Flags enum and the result is always parseable by the System.Enum.Parse(Type, string) method as long as the separator is the comma character.
CompoundFlagsAndNumber4 The result can contain defined names (including compound ones, which do not represent single bits) and optionally also a numeric value if the result cannot be covered only by names. The result will not be parseable by the System.Enum.Parse(Type, string) method if contains a number along with names. To parse such a result the Enum<TEnum>.Parse and Enum<TEnum>.TryParse overloads can be used.
See Also

Reference