Hi All,
Long time no see... I hope you'll are doing well.
We have already discussed Enums in one of the blogs. If you haven't checked it already, refer: https://jyotsnanav.blogspot.com/2020/06/enum-and-how-to-use-and-extend-them-in.html
Today, we'll talk about how Enums can be used and returns an enum with the integer value. The method used is Enum.FromInteger
This method takes the Integer (Enum Ordinal) and returns the value of the Enum.
Syntax:
Enum with integer value := Enum.FromInteger(Value: Integer)
Example:
In this example, there are two Enum values in an Enum. The codeunit procedure has the method Enum.FromInteger that takes Ordinal (Integer) as a parameter and returns the Enum value. In this case, Answer is Yes.
Hope you liked this short and sweet blog. See you until next time. :)
Check out other blogs, if you haven't already.
Please suggest what else do you want me to blog about. Keep following and supporting!
You can also email me at jyotsnaoberainav@gmail.com
Also, visit my website JONAV if you are looking for NAV/D365BC Training and/or Services!
Thank you!
This comment has been removed by the author.
ReplyDeleteIt a standard method for enum Datatype.
Delete