Enum.GetValues() Return Type

后端 未结 6 629
孤独总比滥情好
孤独总比滥情好 2020-12-01 11:45

I have read documentation that states that ‘given the type of the enum, the GetValues() method of System.Enum will return an array of the given enum\'s base type’ ie int, by

6条回答
  •  萌比男神i
    2020-12-01 12:13

    Can you please refer to the documentation you mention. The MSDN documentation on Enum.GetValues does not mention anything like that (quote from that page):

    Return Value

    Type: System.Array

    An Array of the values of the constants in enumType. The elements of the array are sorted by the binary values of the enumeration constants.

提交回复
热议问题