KeywordAttribute Class

Description

Specifies that a method is a keyword. If the name of the keyword is not specified the name of the annotated method is used as the keyword name.

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Method>
Public Class KeywordAttribute Inherits Attribute

Properties

Name Description
Name Property (KeywordAttribute) Gets the name of the keyword. The default value is an empty string.
Description Property (KeywordAttribute) Gets the description of the keyword. The default value is an empty string.

Example: Creating a keyword with two arguments

Use the following code sample to create the keyword Login with the arguments username and password:

<Keyword()>
Public Sub Login(username As String, password As String)
  ' keyword implementation
End Sub

Example: Specifying a keyword name

To specify the keyword name when creating a new keyword, use the following code sample:

<Keyword("Login user")>
Public Sub Login(username As String, password As String)
  ' keyword implementation
End Sub