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
'宣言
Function SetFieldDefault ( _
bstrFieldName As String, _
bstrNewValue As String _
) As Integer
'使用
Dim instance As IVsExpansionSession
Dim bstrFieldName As String
Dim bstrNewValue As String
Dim returnValue As Integer
returnValue = instance.SetFieldDefault(bstrFieldName, _
bstrNewValue)
int SetFieldDefault(
string bstrFieldName,
string bstrNewValue
)
int SetFieldDefault(
[InAttribute] String^ bstrFieldName,
[InAttribute] String^ bstrNewValue
)
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.