Extension Methods

 Are extension methods still recognized in the latest visual cobol for .net?  I have a very simple ext method I am trying out and it does not seem to be recognized.  I keep getting the error Undefined Error Contact Tech Support.  I have a static extensions class like this.  

class-id Extensions static.

 

Method-id CountWords(str as string) returning result as binary-long extension static.
    declare #words as string occurs any = str::Split(' ')
    set result to size of #words
end method.
End class.

 

 

Then my calling method is in another class like this.

Method-id SomeMethod()

declare a as string = "Mary"
declare b as binary-long = a::CountWords

End method.

 

Intellisense does not recognize CountWords as an extension and I get the error noted above.

Tags: