共用方式為


ExpansionFunction.GetCurrentValue Method

Gets the current value of the expansion function as a string.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'宣告
Public MustOverride Function GetCurrentValue As String
public abstract string GetCurrentValue()

Return Value

Type: System.String
The current value of the expansion function, otherwise nulla null reference (Nothing in Visual Basic).

Remarks

You must implement this method in a class derived from the ExpansionFunction class in order to provide a value for an expansion function. Your implementation of this method can call the GetArgument method to obtain values for any arguments the expansion function may have. Returning a null value indicates that the expansion function could not be evaluated (in which case the default value of the field is shown).

.NET Framework Security

See Also

Reference

ExpansionFunction Class

GetCurrentValue Overload

Microsoft.VisualStudio.Package Namespace