Share via


IVsExpansionSession.SetFieldDefault Method

Sets the default value for the specified field.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function SetFieldDefault ( _
    bstrFieldName As String, _
    bstrNewValue As String _
) As Integer
int SetFieldDefault(
    string bstrFieldName,
    string bstrNewValue
)
int SetFieldDefault(
    [InAttribute] String^ bstrFieldName, 
    [InAttribute] String^ bstrNewValue
)
abstract SetFieldDefault : 
        bstrFieldName:string * 
        bstrNewValue:string -> int
function SetFieldDefault(
    bstrFieldName : String, 
    bstrNewValue : String
) : int

Parameters

  • bstrFieldName
    Type: System.String

    [in] A string containing the name of the field.

  • bstrNewValue
    Type: System.String

    [in] A string containing the default value to use.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsExpansionSession::SetFieldDefault(
   [in] BSTR bstrFieldName,
   [in] BSTR bstrNewValue
);

Typically, a code snippet specifies default values for all fields. This method is used to override the default value for a specified field.

.NET Framework Security

See Also

Reference

IVsExpansionSession Interface

Microsoft.VisualStudio.TextManager.Interop Namespace