Compartilhar via


IEditorOptions.SetOptionValue<T> Method (EditorOptionKey<T>, T)

Sets the value of the specified option in the current scope.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Sub SetOptionValue(Of T) ( _
    key As EditorOptionKey(Of T), _
    value As T _
)
void SetOptionValue<T>(
    EditorOptionKey<T> key,
    T value
)
generic<typename T>
void SetOptionValue(
    EditorOptionKey<T> key, 
    T value
)
abstract SetOptionValue : 
        key:EditorOptionKey<'T> * 
        value:'T -> unit
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of the key.

Parameters

  • value
    Type: T

    The new value of the option.

Remarks

If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

.NET Framework Security

See Also

Reference

IEditorOptions Interface

SetOptionValue Overload

Microsoft.VisualStudio.Text.Editor Namespace