Share via


EdmTypeSemantics.AsEnum Method

Returns a valid enumeration type reference to the type definition if this reference is of an enumeration type. Otherwise, it will return a bad enumeration type reference.

Namespace:  Microsoft.Data.Edm
Assembly:  Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function AsEnum ( _
    type As IEdmTypeReference _
) As IEdmEnumTypeReference
'Usage
Dim type As IEdmTypeReference 
Dim returnValue As IEdmEnumTypeReference 

returnValue = type.AsEnum()
public static IEdmEnumTypeReference AsEnum(
    this IEdmTypeReference type
)
[ExtensionAttribute]
public:
static IEdmEnumTypeReference^ AsEnum(
    IEdmTypeReference^ type
)
static member AsEnum : 
        type:IEdmTypeReference -> IEdmEnumTypeReference
public static function AsEnum(
    type : IEdmTypeReference
) : IEdmEnumTypeReference

Parameters

Return Value

Type: Microsoft.Data.Edm.IEdmEnumTypeReference
A valid enumeration type reference if the definition of the reference is of an enumeration type. Otherwise a bad enumeration type reference.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEdmTypeReference. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.113) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.113).

See Also

Reference

EdmTypeSemantics Class

Microsoft.Data.Edm Namespace