'How compare CodeFunction.Access value?

I'm generating methods of partial classes. Using T4 Text Template

At first, I'm looking for extra implemented methods in the interface.
After that, reading access type, calling CodeFunction.Access.

I need compare CodeFunction.Access result.
I tried:

if(extraMethod.Access == vsCMAccessPublic)
if(extraMethod.Access == "vsCMAccessPublic")

no result....

If withdraw <#= extraMethod.Access #> I get vsCMAccessPublic



Solution 1:[1]

Answer:

if(extraMethod.Access ==  EnvDTE.vsCMAccess.vsCMAccessPublic)

or

if(extraMethod.Access ==  vsCMAccess.vsCMAccessPublic)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vinzee